Skip to content

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.

GetPickupQuality(id)
Parameter Type
id number the pickup

number - 1..4, 0 = the class’s own; nil for an entity that is no item pickup

-- a mode that keeps dropped items in its own records
function OnPlayerDrop(pid, id)
local x, y, z = GetEntityPos(id)
SaveDrop(GetEntityTemplate(id), x, y, z, GetPickupHealth(id), GetPickupQuality(id))
end

SetPickupQuality · GetPickupHealth · OnPlayerDrop · OnPlayerPickup · the Items and inventory group of the index