setPedAmmoByType
SET_PED_AMMO_BY_TYPE0x5FD1E1F011E76D7EThe GTA V native SET_PED_AMMO_BY_TYPE of the WEAPON namespace, as LS:MP client scripts call it: the global function setPedAmmoByType, in JavaScript and in Lua.
setPedAmmoByType(ped: Ped, ammoTypeHash: Hash, ammo: number): voidsetPedAmmoByType(ped: Ped, ammoTypeHash: Hash, ammo: integer)Usage
JavaScript
setPedAmmoByType(ped, ammoTypeHash, ammo);Lua
setPedAmmoByType(ped, ammoTypeHash, ammo)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
ammoTypeHash | Hash | number | integer |
ammo | int | 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.
Reference
- Namespace
- Weapon WEAPON
- In the game
void SET_PED_AMMO_BY_TYPE(Ped ped, Hash ammoTypeHash, int ammo)- Hash
0x5FD1E1F011E76D7E