ObjectClient

getDefaultAmmoForWeaponPickup

GET_DEFAULT_AMMO_FOR_WEAPON_PICKUP0xDB41D07A45A6D4B7

The GTA V native GET_DEFAULT_AMMO_FOR_WEAPON_PICKUP of the OBJECT namespace, as LS:MP client scripts call it: the global function getDefaultAmmoForWeaponPickup, in JavaScript and in Lua.

SignatureJavaScript
getDefaultAmmoForWeaponPickup(pickupHash: Hash): number
SignatureLua
getDefaultAmmoForWeaponPickup(pickupHash: Hash): integer

Usage

JavaScript
const result = getDefaultAmmoForWeaponPickup(pickupHash);
Lua
local result = getDefaultAmmoForWeaponPickup(pickupHash)

Parameters

ParameterTypeJavaScriptLua
pickupHashHashnumberinteger

Returns

int JavaScript number, Lua integer

Reference

Namespace
Object OBJECT
In the game
int GET_DEFAULT_AMMO_FOR_WEAPON_PICKUP(Hash pickupHash)
Hash
0xDB41D07A45A6D4B7

Open in the interactive natives reference