GetPlayerEquipment
What the player wears and holds - clothing, armour, the weapons in the slots.
Class GUIDs. Once the server follows the player’s items - a moment after the spawn - this is derived from the item records:
what their game marks as worn or equipped, and under [audit] mode = "enforce" only classes the records hold one of, so a
sword conjured into a hand is no weapon of record. A hint from their game that arrives before then is ignored, so the list is
empty for a new player; for a player whose items the server cannot judge (no tables export), it is what their game reports.
The damage model reads the armour from here;
GetPlayerWeapon names the weapon it charges the hits to.
Syntax
Section titled “Syntax”GetPlayerEquipment(pid)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
Returns
Section titled “Returns”table - a list of item class GUIDs; {} before the first report
Example
Section titled “Example”for _, class in ipairs(GetPlayerEquipment(pid)) do local info = GetItemInfo(class) if info and info.category == "Helmet" then hasHelmet = true endendSee also
Section titled “See also”GetPlayerInventory · GetPlayerWeapon · GetItemInfo · the Items and inventory group of the index
