{"hash":"0x5E3BDDBCB83F3D84","ns":"WEAPON","name":"GIVE_WEAPON_TO_PED","slug":"GIVE_WEAPON_TO_PED","official":true,"named":true,"luaName":"GiveWeaponToPed","game":"rdr3","apiset":"client","returnType":"Hash","params":[{"name":"ped","type":"Ped"},{"name":"weaponHash","type":"Hash"},{"name":"ammoCount","type":"int"},{"name":"bForceInHand","type":"BOOL"},{"name":"bForceInHolster","type":"BOOL"},{"name":"attachPoint","type":"int"},{"name":"bAllowMultipleCopies","type":"BOOL"},{"name":"p7","type":"float"},{"name":"p8","type":"float"},{"name":"addReason","type":"Hash"},{"name":"bIgnoreUnlocks","type":"BOOL"},{"name":"permanentDegradation","type":"float"},{"name":"p12","type":"BOOL"}],"summary":"Gives the ped the weapon.","descriptions":[{"source":"alloc8or","format":"text","body":"Gives the ped the weapon.\nList: https://github.com/femga/rdr3_discoveries/blob/master/weapons/weapons.lua\n\nParams: p7 is 0.5f, and p8 is 1.0f. p11 and p12 are both 0 in R* Scripts\nattachPoint: see SET_CURRENT_PED_WEAPON\naddReason: see _ADD_AMMO_TO_PED\npermanentDegradation: default 0.5, any higher than 0 it will automatically make the weapon worn, you can also adjust the value to change the weapons maximum cleanliness"}],"examples":[],"aliases":[],"enums":["eWeaponAttachPoint"],"related":[],"build":"1207","sources":["alloc8or"],"doc":2,"url":"https://natives.borderlinerp.com/natives/WEAPON/GIVE_WEAPON_TO_PED","markdownUrl":"https://natives.borderlinerp.com/natives/WEAPON/GIVE_WEAPON_TO_PED.md","snippets":{"lua":"local retval = GiveWeaponToPed(ped, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, p7, p8, addReason, bIgnoreUnlocks, permanentDegradation, p12)","luaInvoke":"local retval = Citizen.InvokeNative(0x5E3BDDBCB83F3D84, ped, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, p7, p8, addReason, bIgnoreUnlocks, permanentDegradation, p12, Citizen.ResultAsInteger())","js":"const retval = GiveWeaponToPed(ped, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, p7, p8, addReason, bIgnoreUnlocks, permanentDegradation, p12);","jsInvoke":"const retval = Citizen.invokeNative('0x5E3BDDBCB83F3D84', ped, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, p7 + 0.0000001, p8 + 0.0000001, addReason, bIgnoreUnlocks, permanentDegradation + 0.0000001, p12, Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"int retval = Function.Call<int>((Hash)0x5E3BDDBCB83F3D84, ped, weaponHash, ammoCount, bForceInHand, bForceInHolster, attachPoint, bAllowMultipleCopies, p7, p8, addReason, bIgnoreUnlocks, permanentDegradation, p12);","notes":["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` ``.","Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason."]}}