GET_CURRENT_PED_WEAPON
Returns the hash of weapon the Ped is currently using.
Signature
Hash GET_CURRENT_PED_WEAPON(Ped ped);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | The target ped. |
Returns Hash — The weapon hash.
Description
Returns the hash of weapon the Ped is currently using.
Usage
local retval = GetCurrentPedWeapon(ped)
-- always works, by hash
local retval = Citizen.InvokeNative(0xb0237302, ped, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetCurrentPedWeapon(ped);
// by hash
const retval = Citizen.invokeNative('0xb0237302', ped, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0xb0237302, ped);See also
SET_CURRENT_PED_WEAPONSET_CURRENT_PED_WEAPON This is the server-side RPC native equivalent of the client native SET_CURRENT_PED_WEAPON.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.