RedM Natives

_REMOVE_WEAPON_FROM_PED_BY_GUID

Hash0x51C3B71591811485
Runtime nameRemoveWeaponFromPedByGuid
NamespaceWEAPON
SideClient
NameCommunity guess
Docs
Since build1311

Signature

void _REMOVE_WEAPON_FROM_PED_BY_GUID(Ped ped, Any* weaponGuid, Hash removeReason);

Parameters

NameTypeDescription
pedPed—
weaponGuidAny*—
removeReasonHash—

Returns void

Usage

Lua
local weaponGuid = RemoveWeaponFromPedByGuid(ped, removeReason)

-- always works, by hash
local weaponGuid = Citizen.InvokeNative(0x51C3B71591811485, ped, Citizen.PointerValueInt(), removeReason)
JavaScript and C#
JavaScript
const weaponGuid = RemoveWeaponFromPedByGuid(ped, removeReason);

// by hash
const weaponGuid = Citizen.invokeNative('0x51C3B71591811485', ped, Citizen.pointerValueInt(), removeReason);
C#
var weaponGuid = new OutputArgument();
Function.Call((Hash)0x51C3B71591811485, ped, weaponGuid, removeReason);
// weaponGuid.GetResult<int>()
  • 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`.
  • Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
  • Any* arguments are often structs. Build them with a DataView buffer and pass it with :Buffer() — see the examples and notes below.
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB

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