Andrew_S90 92 Posted November 17, 2020 Dual Arms This is mod that allows use of two primary weapons, one in your main slot one in your launcher slot. You can download the mod from here: http://steamcommunity.com/sharedfiles/filedetails/?id=1334412770 This mod needs overrides to work together with Exile. (See below) Here is a video preview: Installation Files here: https://github.com/Andrew-S90/DualArms Client: Step 1: Paste the following into your description.ext - its very important because you need to override my hook file to disable the eventhandlers!! Otherwise it will break. #include "custom\dual_arms\CfgSecondaryWeapons.hpp" Inside CfgSecondaryWeapons you can turn addactions on or off, drop weapons on death on or off, turn inventory buttons on or off block weapons as well as override any of my script files. In mission.sqm please add "secondary_weapons" to addons to require players to have the mod, plus the server needs it as well. Like this: addOns[]= { "exile_client", "secondary_weapons", "a3_map_altis" }; You will need to launch the @DualArms mod with your server. Step 2: The following overrides need to be made ExileClient_gui_hud_event_onKeyUp.sqf On line 170 (original files) The code needs to be modified to: Spoiler //Dual Arms Start private _dialog = uiNameSpace getVariable ["RscDisplayInventory", displayNull]; if (secondaryWeapon player != "") then { if (((secondaryWeapon player) splitString "_") select ((count ((secondaryWeapon player) splitString "_"))-1) == "secondary") then { if(!(SecondaryWeaponsSwapping) && (_dialog isEqualTo displayNull)) then { (primaryWeapon player) spawn SecondaryWeapons_events_swapSecondaryWeapon; }; } else { if (secondaryWeapon player != currentWeapon player) then { player selectWeapon (secondaryWeapon player); }; }; } else { if (primaryWeapon player != "") then { if(!(SecondaryWeaponsSwapping) && (_dialog isEqualTo displayNull)) then { (primaryWeapon player) spawn SecondaryWeapons_events_addSecondaryWeapon; }; }; }; //Dual Arms End ExileClient_object_player_event_onInventoryClosed.sqf (after line 16) //Dual Arms call SecondaryWeapons_events_onInventoryClosed; ExileClient_object_player_event_onInventoryOpened.sqf (MOST IMPORTANT OVERRIDE!) Update Line 12: private ["_cancelEvent", "_container", "_secondaryContainer", "_dialog", "_BG", "_slot", "_prim", "_posSlot", "_posBtn", "_buttonDown", "_buttonUp", "_cover", "_pic", "_icoB", "_ico", "_SecondaryWeaponItems"]; Paste this AFTER Line 48 if statement (about "Exile_Container_OldChest") and BEFORE ExileClientInventoryOpened = true; Spoiler if (SecondaryWeaponsSwapping) then { throw true; }; InventoryOpened = true; disableSerialization; _dialog = uiNameSpace getVariable ["RscDisplayInventory", displayNull]; _BG = _dialog displayCtrl 1247; _slot = _dialog displayCtrl 611; _prim = _dialog displayCtrl 610; SecondaryWeaponsAccSlotInfo set [0, ctrlPosition (_dialog displayCtrl 626)]; SecondaryWeaponsMagazineSlotInfo set [0, ctrlPosition (_dialog displayCtrl 627)]; SecondaryWeaponsMuzzleSlotInfo set [0, ctrlPosition (_dialog displayCtrl 624)]; SecondaryWeaponsOpticSlotInfo set [0, ctrlPosition (_dialog displayCtrl 625)]; SecondaryWeaponsUnderSlotInfo set [0, ctrlPosition (_dialog displayCtrl 642)]; _posSlot = ctrlPosition _slot; SecondaryWeaponsInventoryPosition = _posSlot; _posBtn = ctrlPosition _prim; if(SecondaryWeaponsInventoryIcons) then { _buttonDown = _dialog ctrlCreate ["RscActivePictureDown", 1337]; _buttonDown ctrlSetPosition [((_posBtn select 0) + (_posBtn select 2) - 0.03), (_posBtn select 1),(_posBtn select 2)/12,(_posBtn select 3)]; _buttonDown ctrlCommit 0; _buttonUp = _dialog ctrlCreate ["RscActivePictureUp", 6969]; _buttonUp ctrlSetPosition [((_posSlot select 0) + (_posSlot select 2) - 0.03), (_posSlot select 1),(_posSlot select 2)/12,(_posSlot select 3)]; _buttonUp ctrlEnable (SecondaryWeaponsClassName != ""); _buttonUp ctrlCommit 0; }; if (((secondaryWeapon player) !="") && {((secondaryWeapon player) splitString "_") select ((count ((secondaryWeapon player) splitString "_"))-1) == "secondary"}) then { SecondaryWeaponsClassName = (secondaryWeapon player); _cover = _dialog ctrlCreate ["RscText", 1530]; _cover ctrlSetPosition _posSlot; _cover ctrlSetBackgroundColor [0.7,0.7,0.7,0.1]; _cover ctrlCommit 0; _pic = _dialog ctrlCreate ["RscPictureKeepAspect", 1531]; _pic ctrlSetPosition _posSlot; _pic ctrlSetText (getText(configFile >> "cfgWeapons" >> (secondaryWeapon player) >> "img")); _pic ctrlCommit 0; { _x ctrlSetPosition [0,0,0,0]; _x ctrlSetScale 0; _x ctrlCommit 0; } forEach [_slot,_BG]; { (_dialog displayCtrl (_x select 1)) ctrlSetPosition [0,0,0,0]; (_dialog displayCtrl (_x select 1)) ctrlSetScale 0; (_dialog displayCtrl (_x select 1)) ctrlCommit 0; (_dialog displayCtrl (_x select 2)) ctrlSetPosition [0,0,0,0]; (_dialog displayCtrl (_x select 2)) ctrlSetScale 0; (_dialog displayCtrl (_x select 2)) ctrlCommit 0; _icoB = _dialog ctrlCreate ["RscText", ((_x select 1)*4)]; _icoB ctrlSetPosition (_x select 0); _icoB ctrlSetBackgroundColor [0.7,0.7,0.7,0.1]; _icoB ctrlCommit 0; _ico = _dialog ctrlCreate ["RscPictureKeepAspect", ((_x select 2)*4)]; _ico ctrlSetPosition (_x select 0); _ico ctrlSetText (_x select 4); _ico ctrlCommit 0; } forEach [SecondaryWeaponsAccSlotInfo,SecondaryWeaponsMagazineSlotInfo,SecondaryWeaponsMuzzleSlotInfo,SecondaryWeaponsOpticSlotInfo,SecondaryWeaponsUnderSlotInfo]; _SecondaryWeaponItems = false call SecondaryWeapons_util_Ammo; if(((_SecondaryWeaponItems select 0) select 1) != "") then { ((_SecondaryWeaponItems select 0) select 1) call SecondaryWeapons_gui_muzzleSlot; }; if(count SecondaryWeaponsWeaponInfo > 0 && !((SecondaryWeaponsWeaponInfo select 0) isEqualTo "ARRAY")) then { (SecondaryWeaponsWeaponInfo select 0) call SecondaryWeapons_gui_accSlot; }; if(((_SecondaryWeaponItems select 0) select 2) != "") then { ((_SecondaryWeaponItems select 0) select 2) call SecondaryWeapons_gui_opticSlot; }; if(((_SecondaryWeaponItems select 0) select 3) != "") then { ((_SecondaryWeaponItems select 0) select 3) call SecondaryWeapons_gui_underSlot; }; if(count (_SecondaryWeaponItems select 1) > 0) then { (_SecondaryWeaponItems select 1) call SecondaryWeapons_gui_magazineSlot; }; } else { SecondaryWeaponsClassName = ""; }; ExileClient_object_player_event_onKilled.sqf (SECOND MOST IMPORTANT!!) After Line 41 not inside brackets add: //Dual Arms _this call SecondaryWeapons_events_onKilled; ExileClient_object_player_event_onTake.sqf After Line 15 add: //Dual Arms _this call SecondaryWeapons_events_onTake; ExileClient_gui_traderDialog_updateInventoryListBox.sqf After Line 63 (_itemClassName = _x;) add: if (!((_itemClassName splitString "_") select ((count (_itemClassName splitString "_"))-1) == "secondary")) then { Close the if statement after line 157 like so: _inventoryListBox lbSetTextRight [_indexEntryIndex, "(not empty)"]; }; }; } forEach _items; true Server: ExileServer_system_network_event_onHandleDisconnect.sqf After Line 42: Spoiler //Dual Arms Start _SWInfo = _unit getVariable ["SecondaryWeaponsWeaponInfo", []]; if(count _SWInfo > 0) then { _uniform = uniformContainer _unit; _vest = vestContainer _unit; _backpack = backpackContainer _unit; _containers = [_uniform, _vest, _backpack]; { _item = _x; _className = ""; _array = false; _added = false; if(typeName _item isEqualTo "ARRAY") then { _array = true; _className = _x select 0; } else { _className = _x; }; { if (!(isNull _x)) then { if (_x canAdd [_className, 1]) exitWith { if(_array) then { _unit addMagazine [_className, _item select 1]; } else { _className = [_className, 0, -10] call BIS_fnc_trimString; _unit addItem _className; }; _added = true; }; }; if (_added) exitWith {}; } forEach _containers; } forEach _SWInfo; }; //Dual Arms End See the github post here: https://github.com/Andrew-S90/DualArms for an example mission and all the code in full Download: https://steamcommunity.com/sharedfiles/filedetails/?id=1334412770 The current list of supported mods is: Spoiler Mods currently supported: RHSUSAF : http://steamcommunity.com/sharedfiles/filedetails/?id=843577117 RHSAFRF : http://steamcommunity.com/sharedfiles/filedetails/?id=843425103 RHSGREF : http://steamcommunity.com/sharedfiles/filedetails/?id=843593391 RHSSAF : http://steamcommunity.com/sharedfiles/filedetails/?id=843632231 NIArms : http://steamcommunity.com/sharedfiles/filedetails/?id=1208517358 Project Infinite : http://steamcommunity.com/sharedfiles/filedetails/?id=807038742 Exile Mod : http://www.exilemod.com/downloads/ ADR-97 Weapon Pack : http://steamcommunity.com/sharedfiles/filedetails/?id=669962280 Operation: TREBUCHET : http://steamcommunity.com/sharedfiles/filedetails/?id=769440155 Cup Weapons : http://steamcommunity.com/sharedfiles/filedetails/?id=497660133 NATO_Rus_Weapons : http://steamcommunity.com/sharedfiles/filedetails/?id=500929500 Specialist Military Arms (SMA) : http://steamcommunity.com/sharedfiles/filedetails/?id=699630614 The_Unsung_Vietnam_War_Mod : http://steamcommunity.com/sharedfiles/filedetails/?id=943001311 FFAA Mod : http://steamcommunity.com/sharedfiles/filedetails/?id=820994401 VME PLA : http://steamcommunity.com/sharedfiles/filedetails/?id=655153321 2035: Russian Armed Forces : http://steamcommunity.com/sharedfiles/filedetails/?id=543460260 FHQ Firearms : http://steamcommunity.com/sharedfiles/filedetails/?id=402601958 BWMod : http://steamcommunity.com/sharedfiles/filedetails/?id=1200127537 SFP: Swedish Forces Pack : http://steamcommunity.com/sharedfiles/filedetails/?id=826911897 3CB BAF Weapons : http://steamcommunity.com/sharedfiles/filedetails/?id=893339590 Faces of war : http://steamcommunity.com/sharedfiles/filedetails/?id=891433622 IFA3_AIO_LITE : http://steamcommunity.com/sharedfiles/filedetails/?id=660460283 Arma 3 Aegis (Beta) : http://steamcommunity.com/sharedfiles/filedetails/?id=949252631 Update 2.0: EricJ Weapons Pack : https://steamcommunity.com/sharedfiles/filedetails/?id=667711976 Arma 3 DLC: Contact : https://store.steampowered.com/app/1021790/Arma_3_Contact/ Arma 3 CDLC: Global Mobilization : https://store.steampowered.com/app/1042220/Arma_3_Creator_DLC_Global_Mobilization__Cold_War_Germany/ HoboArmaPack : https://steamcommunity.com/sharedfiles/filedetails/?id=633936703 Epoch : https://steamcommunity.com/sharedfiles/filedetails/?id=421839251 FHQ_Accessories : https://steamcommunity.com/sharedfiles/filedetails/?id=388697912 RKSL Studios: Attachments v3.02 : https://steamcommunity.com/sharedfiles/filedetails/?id=1661066023 Ravage : https://steamcommunity.com/sharedfiles/filedetails/?id=1376636636 KA Weapons Pack NEW : https://steamcommunity.com/sharedfiles/filedetails/?id=1369953203 R3F Armes 3.6.3 : https://steamcommunity.com/sharedfiles/filedetails/?id=941128190 Complementary Special Weapons : https://steamcommunity.com/sharedfiles/filedetails/?id=1369955673 USSOC_LITE_mas : https://steamcommunity.com/sharedfiles/filedetails/?id=1141915433 Complementary Police Weapons : https://steamcommunity.com/sharedfiles/filedetails/?id=951195196 Breaking Point Weapons : https://steamcommunity.com/sharedfiles/filedetails/?id=973548592 3 1 Share this post Link to post Share on other sites
Andrew_S90 92 Posted November 21, 2020 Pushed an update to the github that fixes disappearing weapon after relog (when switching) and scroll wheel. Please get the updated copy of SecondaryWeapons_player_hook.sqf and replace it with the one in your mission. Thanks! 2 Share this post Link to post Share on other sites
Andrew_S90 92 Posted December 30, 2020 Mod updated to fix M320 LRR p3d bug and missing Exile Bullet Cam mags. Thanks all! 1 Share this post Link to post Share on other sites
leonidmanylov 12 Posted January 1, 2021 What is the idd's in the infistar? I will be very grateful) 1 Share this post Link to post Share on other sites
278074662 0 Posted February 10, 2021 3 Re-landing 3 weapons will disappear Restart the server and log in again, the weapon will disappear Share this post Link to post Share on other sites
Lady Val 0 Posted July 3, 2022 I added the #include.... in description.ext I added the "secondary_weapons" in mission.sqm I added all the .sqf in Custom to overwrite the originals I called each of the sqf in config.cpp Obviously added @dualArms to the directory, added the key and added in the command line. Still, having the same issue: the secondary weapon says "you are not going to be able to see this weapon. You have to configure the mod correctly" (or something like that) and the weapon is puff! Can you please help me to see what I am doing wrong? Thanks a lot (BTW, I used to use this mod before in 2019 and everything worked correctly... I am doing it all new, not copy/paste) Share this post Link to post Share on other sites