Skip to content

GetCarryItemHolder

Who holds a carry item, if anyone.

GetCarryItemHolder(entityId)
Parameter Type
entityId number the carry item

number | nil - the player holding it (or reaching for it); nil when it lies in the world

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"))
end

GetPlayerCarryItem · GetEntities · the Carry items group of the index