addPedAmmoByType
ADD_PED_AMMO_BY_TYPE0x2472622CE1F2D45FThe GTA V native ADD_PED_AMMO_BY_TYPE of the WEAPON namespace, as LS:MP client scripts call it: the global function addPedAmmoByType, in JavaScript and in Lua.
addPedAmmoByType(ped: Ped, ammoTypeHash: Hash, ammo: number): voidaddPedAmmoByType(ped: Ped, ammoTypeHash: Hash, ammo: integer)Usage
JavaScript
addPedAmmoByType(ped, ammoTypeHash, ammo);Lua
addPedAmmoByType(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 ADD_PED_AMMO_BY_TYPE(Ped ped, Hash ammoTypeHash, int ammo)- Hash
0x2472622CE1F2D45F- Introduced
- Game build 1103 legacy numbering
- Formerly
_ADD_PED_AMMO_ADD_AMMO_TO_PED_BY_TYPE