GET_AMMO_IN_CLIP
Hash
0x2E1202248937775CRuntime name
GetAmmoInClipNamespaceWEAPON
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x2E1202248937775CSignature
BOOL GET_AMMO_IN_CLIP(Ped ped, int* ammo, Hash weaponHash);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
ammo | int* | — |
weaponHash | Hash | — |
Returns BOOL
Usage
local retval, ammo = GetAmmoInClip(ped, weaponHash)
-- always works, by hash
local retval, ammo = Citizen.InvokeNative(0x2E1202248937775C, ped, Citizen.PointerValueInt(), weaponHash, Citizen.ReturnResultAnyway())JavaScript and C#
const [retval, ammo] = GetAmmoInClip(ped, weaponHash);
// by hash
const [retval, ammo] = Citizen.invokeNative('0x2E1202248937775C', ped, Citizen.pointerValueInt(), weaponHash, Citizen.returnResultAnyway());var ammo = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x2E1202248937775C, ped, ammo, weaponHash);
// ammo.GetResult<int>()- 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`. - Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
See also
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.