GetPickupQuality
The quality of a pickup’s item.
What a mode that handles drops or pickups itself reads to keep the item’s quality - pass it to CreatePickup when it lays the
item again, or to GivePlayerItem when it gives the item itself.
Syntax
Section titled “Syntax”GetPickupQuality(id)| Parameter | Type | |
|---|---|---|
id |
number | the pickup |
Returns
Section titled “Returns”number - 1..4, 0 = the class’s own; nil for an entity that is no item pickup
Example
Section titled “Example”-- a mode that keeps dropped items in its own recordsfunction OnPlayerDrop(pid, id) local x, y, z = GetEntityPos(id) SaveDrop(GetEntityTemplate(id), x, y, z, GetPickupHealth(id), GetPickupQuality(id))endSee also
Section titled “See also”SetPickupQuality · GetPickupHealth · OnPlayerDrop · OnPlayerPickup · the Items and inventory group of the index
