removeWeaponFromPed
REMOVE_WEAPON_FROM_PED0x4899CB088EDF59B8The 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.
removeWeaponFromPed(ped: Ped, weaponHash: Hash): voidremoveWeaponFromPed(ped: Ped, weaponHash: Hash)Usage
JavaScript
removeWeaponFromPed(ped, weaponHash);Lua
removeWeaponFromPed(ped, weaponHash)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
weaponHash | Hash | number | integer |
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