{"hash":"0x9F0E1892C7F228A8","ns":"WEAPON","name":"_GET_WEAPON_REPLACED_HASH","slug":"_GET_WEAPON_REPLACED_HASH","official":false,"named":true,"luaName":"GetWeaponReplacedHash","game":"rdr3","apiset":"client","returnType":"Hash","params":[{"name":"clear","type":"BOOL"}],"summary":"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).","descriptions":[{"source":"alloc8or","format":"text","body":"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).\nIf clear==true, the stored value is reset to 0 after reading (consume semantics); if clear==false, it is not cleared.\nReturns 0 if no replacement is pending."},{"source":"vorp","format":"text","body":"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."}],"examples":[],"aliases":["_GET_WEAPON_LAST_GIVEN"],"enums":[],"related":[],"build":"1207","sources":["alloc8or","vorp"],"doc":2,"url":"https://natives.borderlinerp.com/natives/WEAPON/_GET_WEAPON_REPLACED_HASH","markdownUrl":"https://natives.borderlinerp.com/natives/WEAPON/_GET_WEAPON_REPLACED_HASH.md","snippets":{"lua":"local retval = GetWeaponReplacedHash(clear)","luaInvoke":"local retval = Citizen.InvokeNative(0x9F0E1892C7F228A8, clear, Citizen.ResultAsInteger())","js":"const retval = GetWeaponReplacedHash(clear);","jsInvoke":"const retval = Citizen.invokeNative('0x9F0E1892C7F228A8', clear, Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"int retval = Function.Call<int>((Hash)0x9F0E1892C7F228A8, clear);","notes":["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."]}}