RedM Natives

SET_CURRENT_PED_WEAPON

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

Hash0xB8278882
Runtime nameSetCurrentPedWeapon
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

void SET_CURRENT_PED_WEAPON(Ped ped, Hash weaponHash, BOOL bForceInHand);

Parameters

NameTypeDescription
pedPed—
weaponHashHash—
bForceInHandBOOL—

Returns void

Description

Cfx.re native reference

SET_CURRENT_PED_WEAPON

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

Usage

Lua
SetCurrentPedWeapon(ped, weaponHash, bForceInHand)

-- always works, by hash
Citizen.InvokeNative(0xb8278882, ped, weaponHash, bForceInHand)
JavaScript and C#
JavaScript
SetCurrentPedWeapon(ped, weaponHash, bForceInHand);

// by hash
Citizen.invokeNative('0xb8278882', ped, weaponHash, bForceInHand);
C#
Function.Call((Hash)0xb8278882, ped, weaponHash, bForceInHand);
  • 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

Cfx.re native reference

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