RedM Natives

_GET_WEAPON_REPLACED_HASH

Returns the last weapon hash that was replaced due to a slot/holster swap when giving/equipping a weapon (set internally during weapon give/equip when another weapon gets displaced).

Hash0x9F0E1892C7F228A8
Runtime nameGetWeaponReplacedHash
NamespaceWEAPON
SideClient
NameCommunity guess
Docs
Since build1207
Also known as_GET_WEAPON_LAST_GIVEN

Signature

Hash _GET_WEAPON_REPLACED_HASH(BOOL clear);

Parameters

NameTypeDescription
clearBOOL—

Returns Hash

Description

alloc8or RDR3 NativeDB

Returns the last weapon hash that was replaced due to a slot/holster swap when giving/equipping a weapon (set internally during weapon give/equip when another weapon gets displaced).
If clear==true, the stored value is reset to 0 after reading (consume semantics); if clear==false, it is not cleared.
Returns 0 if no replacement is pending.

VORPCORE RDR3natives

gets the last weapon given to ped , if you give a weapon_lasso to ped and then give another it returns the weapon_lasso other wise 0,p0 usually is 1 is unknown, it does not work for all weapons.

Usage

Lua
local retval = GetWeaponReplacedHash(clear)

-- always works, by hash
local retval = Citizen.InvokeNative(0x9F0E1892C7F228A8, clear, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetWeaponReplacedHash(clear);

// by hash
const retval = Citizen.invokeNative('0x9F0E1892C7F228A8', clear, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x9F0E1892C7F228A8, clear);
  • 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 · VORPCORE RDR3natives

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