- Documentation
- Shared functions
- getPickupWeapon
Function
getPickupWeapon
Returns the weapon ID of a type 2 pickup.
Syntax
int getPickupWeapon(pickup thePickup)Arguments
thePickuppickup- The pickup.
Returns
Weapon ID, or false.
Example
local pickup = createPickup(0, 0, 3, 2, 31, 30000, 200)
outputDebugString(getWeaponNameFromID(getPickupWeapon(pickup)))
See also
getPickupAmmoReturns the amount of ammo in a weapon pickup.createPickupCreates a pickup: a spinning item to collect - a health pack, body armour, a weapon or any model (e.g. a building entrance icon). A player collects it by walking into it; the server then firesonPickupHit(cancelEvent()there stops the collection), and the pickup hides forrespawnIntervaland comes back. The meaning ofamountdepends on the type: health or armour to add, a weapon ID, or a model ID.