RedM Natives

GET_CURRENT_PED_WEAPON

Returns the hash of weapon the Ped is currently using.

Hash0xB0237302
Runtime nameGetCurrentPedWeapon
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

Hash GET_CURRENT_PED_WEAPON(Ped ped);

Parameters

NameTypeDescription
pedPed

The target ped.

Returns Hash — The weapon hash.

Description

Cfx.re native reference

Returns the hash of weapon the Ped is currently using.

Usage

Lua
local retval = GetCurrentPedWeapon(ped)

-- always works, by hash
local retval = Citizen.InvokeNative(0xb0237302, ped, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetCurrentPedWeapon(ped);

// by hash
const retval = Citizen.invokeNative('0xb0237302', ped, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0xb0237302, ped);

See also

Sources

Cfx.re native reference

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