RedM Natives

SET_PED_AMMO

NativeDB Added Parameter 4: BOOL p3 This is the server-side RPC native equivalent of the client native SET_PED_AMMO.

Hash0xBF90DF1A
Runtime nameSetPedAmmo
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

void SET_PED_AMMO(Ped ped, Hash weaponHash, int ammo);

Parameters

NameTypeDescription
pedPed—
weaponHashHash—
ammoint—

Returns void

Description

Cfx.re native reference

NativeDB Added Parameter 4: BOOL p3

This is the server-side RPC native equivalent of the client native SET_PED_AMMO.

Usage

Lua
SetPedAmmo(ped, weaponHash, ammo)

-- always works, by hash
Citizen.InvokeNative(0xbf90df1a, ped, weaponHash, ammo)
JavaScript and C#
JavaScript
SetPedAmmo(ped, weaponHash, ammo);

// by hash
Citizen.invokeNative('0xbf90df1a', ped, weaponHash, ammo);
C#
Function.Call((Hash)0xbf90df1a, ped, weaponHash, ammo);
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.