Skip to main content

CreatePickup

ESX.CreatePickup(type, name, count, label, playerId, components, tintIndex)

This function creates a pickup.

Arguments

ArgumentData TypeOptionalDefault ValueExplanation
typestringNo-The pickup type, valid inputs: item_standard for items, item_money for cash, item_account for an account and item_weapon for weapons
namestringNo-The name of either the item, account or weapon
countnumberNo-The count of the item, cash, account or weapon ammo
labelstringNo-The pickup label drawn
playerIdnumberNo-The player server id who created the pickup, used to determine pickup spawn point
componentstableYes-Only used when type is item_weapon, an index-value table with components
tintIndexnumberYes-Only used when type is item_weapon, a tint index