setAmmoInClip
SET_AMMO_IN_CLIP0xDCD2A934D65CB497The GTA V native SET_AMMO_IN_CLIP of the WEAPON namespace, as LS:MP client scripts call it: the global function setAmmoInClip, in JavaScript and in Lua.
setAmmoInClip(ped: Ped, weaponHash: Hash, ammo: number): booleansetAmmoInClip(ped: Ped, weaponHash: Hash, ammo: integer): booleanUsage
JavaScript
const result = setAmmoInClip(ped, weaponHash, ammo);Lua
local result = setAmmoInClip(ped, weaponHash, ammo)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
weaponHash | Hash | number | integer |
ammo | int | number | integer |
Returns
BOOL JavaScript boolean, Lua booleanNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
Reference
- Namespace
- Weapon WEAPON
- In the game
BOOL SET_AMMO_IN_CLIP(Ped ped, Hash weaponHash, int ammo)- Hash
0xDCD2A934D65CB497