setPedInfiniteAmmo
SET_PED_INFINITE_AMMO0x3EDCB0505123623BThe GTA V native SET_PED_INFINITE_AMMO of the WEAPON namespace, as LS:MP client scripts call it: the global function setPedInfiniteAmmo, in JavaScript and in Lua.
setPedInfiniteAmmo(ped: Ped, toggle: boolean, weaponHash: Hash): voidsetPedInfiniteAmmo(ped: Ped, toggle: boolean, weaponHash: Hash)Usage
JavaScript
setPedInfiniteAmmo(ped, toggle, weaponHash);Lua
setPedInfiniteAmmo(ped, toggle, weaponHash)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
toggle | BOOL | boolean | boolean |
weaponHash | Hash | number | integer |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
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
void SET_PED_INFINITE_AMMO(Ped ped, BOOL toggle, Hash weaponHash)- Hash
0x3EDCB0505123623B