RedM Natives

REMOVE_WEAPON_FROM_PED

This native removes a specified weapon from your selected ped.

Hash0x9C37F220
Runtime nameRemoveWeaponFromPed
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

void REMOVE_WEAPON_FROM_PED(Ped ped, Hash weaponHash);

Parameters

NameTypeDescription
pedPed—
weaponHashHash—

Returns void

Description

Cfx.re native reference

This native removes a specified weapon from your selected ped.
Weapon Hashes: pastebin.com/0wwDZgkF
Example:
C#:
Function.Call(Hash.REMOVE_WEAPON_FROM_PED, Game.Player.Character, 0x99B507EA);
C++:
WEAPON::REMOVE_WEAPON_FROM_PED(PLAYER::PLAYER_PED_ID(), 0x99B507EA);
The code above removes the knife from the player.

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

Usage

Lua
RemoveWeaponFromPed(ped, weaponHash)

-- always works, by hash
Citizen.InvokeNative(0x9c37f220, ped, weaponHash)
JavaScript and C#
JavaScript
RemoveWeaponFromPed(ped, weaponHash);

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

Sources

Cfx.re native reference

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