GetCorpseItems
What a corpse holds.
A corpse is a dead player’s body left after the respawn ([combat] corpse_seconds; its id comes with
OnPlayerCorpse). It holds what the mode put on it with SetCorpseItems, less what searches have taken since. One of
the mode’s tagged items (GivePlayerTaggedItem) on it is an entry of its own, and goes to whoever takes it with its tag.
Syntax
Section titled “Syntax”GetCorpseItems(corpse)| Parameter | Type | |
|---|---|---|
corpse |
number | the corpse’s id |
Returns
Section titled “Returns”table - a list of {class=, amount=, health=, quality=} (quality when known; a tagged item also id=, name=, text=); nil when there is no such corpse (it is gone)
Example
Section titled “Example”local items = GetCorpseItems(corpse)if items and #items == 0 then RemoveCorpse(corpse) end -- searched bare: take it awaySee also
Section titled “See also”SetCorpseItems · OnPlayerCorpse · RemoveCorpse · the Combat group of the index
