_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).
0x9F0E1892C7F228A8GetWeaponReplacedHash_GET_WEAPON_LAST_GIVENSignature
Hash _GET_WEAPON_REPLACED_HASH(BOOL clear);Parameters
| Name | Type | Description |
|---|---|---|
clear | BOOL | — |
Returns Hash
Description
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.
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
local retval = GetWeaponReplacedHash(clear)
-- always works, by hash
local retval = Citizen.InvokeNative(0x9F0E1892C7F228A8, clear, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetWeaponReplacedHash(clear);
// by hash
const retval = Citizen.invokeNative('0x9F0E1892C7F228A8', clear, Citizen.returnResultAnyway(), Citizen.resultAsInteger());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
InvokeNativewith the hash — it always works.
Sources
alloc8or RDR3 NativeDB · VORPCORE RDR3natives
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.