GetCarryItemHolder
Who holds a carry item, if anyone.
Syntax
Section titled “Syntax”GetCarryItemHolder(entityId)| Parameter | Type | |
|---|---|---|
entityId |
number | the carry item |
Returns
Section titled “Returns”number | nil - the player holding it (or reaching for it); nil when it lies in the world
Example
Section titled “Example”for _, id in ipairs(GetEntities(ENTITY_CARRY)) do local holder = GetCarryItemHolder(id) Log("carry item " .. id .. (holder and (" in " .. GetPlayerName(holder) .. "'s hands") or " lies around"))endSee also
Section titled “See also”GetPlayerCarryItem · GetEntities · the Carry items group of the index
