WeaponClient

removeWeaponFromPed

REMOVE_WEAPON_FROM_PED0x4899CB088EDF59B8

The GTA V native REMOVE_WEAPON_FROM_PED of the WEAPON namespace, as LS:MP client scripts call it: the global function removeWeaponFromPed, in JavaScript and in Lua.

SignatureJavaScript
removeWeaponFromPed(ped: Ped, weaponHash: Hash): void
SignatureLua
removeWeaponFromPed(ped: Ped, weaponHash: Hash)

Usage

JavaScript
removeWeaponFromPed(ped, weaponHash);
Lua
removeWeaponFromPed(ped, weaponHash)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
weaponHashHashnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

This native removes a specified weapon from your selected ped.

Example:
C#:

Function.Call(Hash.REMOVE_WEAPON_FROM_PED, Game.Player.Character, 0x99B507EA);

C++:

removeWeaponFromPed(playerPedId(), 0x99B507EA);

The code above removes the knife from the player.
Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json

Reference

Namespace
Weapon WEAPON
In the game
void REMOVE_WEAPON_FROM_PED(Ped ped, Hash weaponHash)
Hash
0x4899CB088EDF59B8

Open in the interactive natives reference