SET_PED_AMMO
NativeDB Added Parameter 4: BOOL p3 This is the server-side RPC native equivalent of the client native SET_PED_AMMO.
Signature
void SET_PED_AMMO(Ped ped, Hash weaponHash, int ammo);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
weaponHash | Hash | — |
ammo | int | — |
Returns void
Description
NativeDB Added Parameter 4: BOOL p3This is the server-side RPC native equivalent of the client native SET_PED_AMMO.
Usage
SetPedAmmo(ped, weaponHash, ammo)
-- always works, by hash
Citizen.InvokeNative(0xbf90df1a, ped, weaponHash, ammo)JavaScript and C#
SetPedAmmo(ped, weaponHash, ammo);
// by hash
Citizen.invokeNative('0xbf90df1a', ped, weaponHash, ammo);Function.Call((Hash)0xbf90df1a, ped, weaponHash, ammo);- Hash parameters: the named function also accepts a string and hashes it for you;
Citizen.InvokeNativeneeds the number — passjoaat("name")or a backtick literal like`name`.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.