FindPlayerItem
The player’s tagged item with that id.
Syntax
Section titled “Syntax”FindPlayerItem(pid, id)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
id |
string | the item’s id |
Returns
Section titled “Returns”table - {class=, amount=1, health=, worn=, id=, name=, text=, weight=, price=, model=} (weight, price and model only when it has its own), or nil when the player holds no item with that id
Example
Section titled “Example”if FindPlayerItem(pid, "gate-key") then SetDoorState(GATE, true, false) endSee also
Section titled “See also”GivePlayerTaggedItem · SetPlayerItemTag · GetPlayerInventory · SetDoorKey · the Items and inventory group of the index
