Skip to content

streetFoodVendorSpawnRequest

Asks your gamemode before a street food vendor appears at a food cart or a hotdog van. One player’s game runs the vendor for everyone; player is that player, not a buyer.

Renamed in 0.28 from streetFoodVendorRequest; see renamed names.

server.on("streetFoodVendorSpawnRequest", ({ player, vendorKind, objectId, unit }) => boolean | void | Promise<boolean | void>)
Name Type Description
player PlayerSnapshot The player whose game would run the vendor.
vendorKind "food-cart" | "hotdog-truck" A food cart or a hotdog van.
objectId number Which cart (its number in the game) or van (its network ID).
unit DispatchUnitProposal The vendor: model, position and network ID.

false keeps the vendor away, so nobody can buy there. true, or nothing, lets the vendor appear. The first false stops the handlers after it. See how decisions work.

Vendors only at food carts, not at hotdog vans.

gamemodes/my-mode.ts
import { server } from "nativemp";
server.on("streetFoodVendorSpawnRequest", ({ vendorKind }) => vendorKind !== "hotdog-truck");