RedM Natives

SET_AMMO_IN_CLIP

Hash0xDCD2A934D65CB497
Runtime nameSetAmmoInClip
NamespaceWEAPON
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xDCD2A934D65CB497

Signature

BOOL SET_AMMO_IN_CLIP(Ped ped, Hash weaponHash, int ammo);

Parameters

NameTypeDescription
pedPed—
weaponHashHash—
ammoint—

Returns BOOL

Usage

Lua
local retval = SetAmmoInClip(ped, weaponHash, ammo)

-- always works, by hash
local retval = Citizen.InvokeNative(0xDCD2A934D65CB497, ped, weaponHash, ammo, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = SetAmmoInClip(ped, weaponHash, ammo);

// by hash
const retval = Citizen.invokeNative('0xDCD2A934D65CB497', ped, weaponHash, ammo, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0xDCD2A934D65CB497, 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`.

See also

Sources

alloc8or RDR3 NativeDB

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