Can anyone point me in the right direction in being able to equip Offhand weapons to the offhand holster.
I’m using Redem_Roleplay with Redemrp_Inventory and I can’t for the life of me find the definitions for SlotIDs or anywhere where offhands are handled.
I don’t have the answer, but I have been looking into it and would like to share my insights.
Right of the bat, the following native can be found:
SetAllowDualWield. In the decompiled scripts, this native is always preceded by two other natives and looks like this:
UNLOCK::_UNLOCK_SET_UNLOCKED(-200143754, true); UNLOCK::_UNLOCK_SET_VISIBLE(-200143754, true); WEAPON::_0x83B8D50EB9446BBA(PLAYER::PLAYER_PED_ID(), 1); // SetAllowDualWield
I tried the above, but the result of GetAllowDualWield is always
false for me. Nevertheless, I continued to figure out how to actually give a second weapon to a ped.
GiveWeaponToPed native (sometimes also referred to as GiveWeaponToPed2) has some options to do this. I believe the key arguments here are:
bAllowMultipleCopies for which I used
true. This does not result in dual weapons, but if you give a weapon this way and press TAB, the weapon is unholstered from the left hip as opposed to the right (it will reset if you open the weapon wheel). So this part seems to be fine.
There are also references to
GetWeaponUnlock in the decompiled scripts, which are used in conjunction with
UnlockSetVisible. But executing these natives didn’t seem to make a difference either.
This is as far as I got.
I looked further, but all I could find is that there are several weapons that have duplicates that end with
_DUALWIELD, for example:
WEAPON_REVOLVER_CATTLEMAN_DUALWIELD. Unfortunately I haven’t found a way to spawn them yet, likely because dual wielding needs to be enabled.
My best guess is that something is unlocked or added to a player once they reach rank 25, but what that is I am not sure. There is a possibility that the natives mentioned above are not used in multiplayer also, which would explain why dual wielding cannot be enabled that way.
The last thing that I have tried is to add an item with hash
-1185145312 (possible name
UPGRADE_OFFHAND_HOLSTER to the inventory, but I haven’t had any luck with that either.
Anyone have other ideas?
Thanks for your research updates, It’s a great start to which I’m sure can be built on!