GetCartPartSlots
The slots a cart of a kind has - a shop’s menu.
Syntax
Section titled “Syntax”GetCartPartSlots([kind])| Parameter | Type | |
|---|---|---|
kind |
string | the cart’s kind; nil = "wagon" (optional) |
Returns
Section titled “Returns”table - the wagon’s {"body", "axle", "wheels", "load", "horse1", "horse2"}, the two-wheeler’s {"body", "wheels", "load", "horse1"}; {} for no such kind
Example
Section titled “Example”-- a shop's menu for the cart the player stands bylocal kind = GetEntityTemplate(cart)for _, slot in ipairs(GetCartPartSlots(kind)) do SendClientMessage(pid, COLOR_WHITE, slot .. ": " .. table.concat(GetCartPartNames(slot, kind), ", "))endSee also
Section titled “See also”GetCartPartNames · SetCartPart · the Carts group of the index
