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.
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=}; 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
