Skip to content

Player:GetObjectCost

Read object cost for this player.

player:GetObjectCost(objectType[, multiplier = 1])

Inputs: objectType is optional an integer object type ID; multiplier is optional a numeric cost multiplier (default 1).

Output: Cost array, available. Positive cost entries; an empty array with available=true means free. Ignore costs when unavailable.

Errors and unavailable states: A wrong receiver or argument type can raise a Lua argument error. No separate error result is returned. Query live state again when the entity may have changed.

See Lua values and game objects for lifetime and enum guidance.