BetterDeadThanZed Posted June 2, 2015 Report Share Posted June 2, 2015 i think the problem here is not that hard to solve, never messed around with deploy anything that much though, BUT: Array String _inventory = (weapons _player) + (magazines _player) + (typeOf (unitBackpack _player)); so if i read that right this lines needs to be: _inventory = (weapons _player) + (magazines _player) + [(typeOf (unitBackpack _player))]; Ok, so I found that code in wrapper.sqf. I will edit it and see what happens. Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted June 2, 2015 Report Share Posted June 2, 2015 Ok, using the above code posted by Schwede and the config code I posted, it still doesn't work. A message comes up saying "Missing tool M2StaticMG_US_Bag_EP1". Link to comment Share on other sites More sharing options...
SchwEde Posted June 2, 2015 Report Share Posted June 2, 2015 player_deploy.sqf from _missing = ""; _hasrequireditem = true; { _hastoolweapon = _x in weapons player; if(!_hastoolweapon) exitWith { _hasrequireditem = false; _missing = getText (configFile >> "cfgWeapons" >> _x >> "displayName"); }; } count _require; to _missing = ""; _hasrequireditem = true; { _hastoolweapon = _x in weapons player; _hasBackpack = _x == typeOf (unitBackpack player); if(!_hastoolweapon && !_hasBackpack) exitWith { _hasrequireditem = false; _missing = getText (configFile >> "cfgWeapons" >> _x >> "displayName"); }; } count _require; not tested though, but you get the idea :) Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted June 2, 2015 Report Share Posted June 2, 2015 Unfortunately I am still getting the same error about "missing tool". Link to comment Share on other sites More sharing options...
SchwEde Posted June 2, 2015 Report Share Posted June 2, 2015 well right ^^ little bit tired here -.- forget the last part: try change this line: _hastoolweapon = (_index call getDeployableKitClass) in ((weapons player) + (magazines player)); to _hastoolweapon = (_index call getDeployableKitClass) in ((weapons player) + (magazines player) + [typeOf (unitBackpack player)]); to this Gr8 1 Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted June 2, 2015 Report Share Posted June 2, 2015 Thanks for all the help, Schwede. That final bit of code worked. The only problem now is that the gunbag isn't removed from the player when he deploys the gun and if you allow repacking, you get another gunbag on the ground, along with a tripod bag so now you have two gunbags and a tripod bag. Of course the solution to the last part is simply not to allow repacking, but it would be awesome if there's a way to remove the backpack from the player when the gun gets deployed. Link to comment Share on other sites More sharing options...
Gr8 Posted June 2, 2015 Report Share Posted June 2, 2015 Thanks for all the help, Schwede. That final bit of code worked. The only problem now is that the gunbag isn't removed from the player when he deploys the gun and if you allow repacking, you get another gunbag on the ground, along with a tripod bag so now you have two gunbags and a tripod bag. Of course the solution to the last part is simply not to allow repacking, but it would be awesome if there's a way to remove the backpack from the player when the gun gets deployed. Look for this in wrapper.sqf _player removeMagazine _part; Add this under _player removeBackpack _part; SchwEde 1 Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted June 2, 2015 Report Share Posted June 2, 2015 Look for this in wrapper.sqf _player removeMagazine _part; Add this under _player removeBackpack _part; Adding that removes the Deploy Anything items. I can't right click on the gun pack and if I click on my toolbox, I only have the standard Epoch options, none of the stuff in the Deploy Anything config. Link to comment Share on other sites More sharing options...
SchwEde Posted June 2, 2015 Report Share Posted June 2, 2015 this needs a bit more coding: removeBackpack unit but this will remove everytime the backpack of the player. Will write something in a couple of minutes EDIT: try adding this instead: if (isClass(configFile >> "CfgVehicles" >> (typeOf _part))) then { removeBackpack _player; }; if this does not work try it just with: if (isClass(configFile >> "CfgVehicles" >> _part)) then { removeBackpack _player; }; Gr8 1 Link to comment Share on other sites More sharing options...
Gr8 Posted June 2, 2015 Report Share Posted June 2, 2015 This is the way to go ! Thanks for the help man :P if (isClass(configFile >> "CfgVehicles" >> _part)) then { removeBackpack _player; }; Link to comment Share on other sites More sharing options...
Gr8 Posted June 2, 2015 Report Share Posted June 2, 2015 Next thing is to remove disassemble gun option on these guns Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted June 2, 2015 Report Share Posted June 2, 2015 this needs a bit more coding: removeBackpack unit but this will remove everytime the backpack of the player. Will write something in a couple of minutes EDIT: try adding this instead: if (isClass(configFile >> "CfgVehicles" >> (typeOf _part))) then { removeBackpack _player; }; if this does not work try it just with: if (isClass(configFile >> "CfgVehicles" >> _part)) then { removeBackpack _player; }; The second one worked! Thanks. The only issue now is that setting damage limit to -1 doesn't prevent it from being repacked and when you repack it, a tripod bag appears with the gun bag. Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted June 2, 2015 Report Share Posted June 2, 2015 Ok, so now there's a new problem. With this solved, the backpack is taken away, which is great, but when I enter the gun, my screen goes black. If I exit to the lobby and come back in, I can see again and I can enter the gun and use it just fine. If I disassemble it and redeploy it, the same black screen happens again. Link to comment Share on other sites More sharing options...
Gr8 Posted June 2, 2015 Report Share Posted June 2, 2015 Ok, so now there's a new problem. With this solved, the backpack is taken away, which is great, but when I enter the gun, my screen goes black. If I exit to the lobby and come back in, I can see again and I can enter the gun and use it just fine. If I disassemble it and redeploy it, the same black screen happens again. You may need to add it to dayz_allowedObjects Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted June 2, 2015 Report Share Posted June 2, 2015 You may need to add it to dayz_allowedObjects That did it! Now, how to stop the gun from being disassembled.... Link to comment Share on other sites More sharing options...
Gr8 Posted June 2, 2015 Report Share Posted June 2, 2015 That did it! Now, how to stop the gun from being disassembled.... I enabled packing for the gun, but the pack option doesnt show up This is the code : ["M2StaticMG_US_Bag_EP1",[0,2,0],1,0.9,true,false,false,true,true,true,false,["M2StaticMG_US_EP1"],[],["M2StaticMG_US_Bag_EP1"],"true"] Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted June 2, 2015 Report Share Posted June 2, 2015 I've tried setting damage to 0, 0.9, 1 and -1 and I still get the option to disassemble. On another note, I have set up a recipe for an M240 nest, but I'm getting that same black screen as I did at first with the M2. I added "Fort_Nest_M240" to DZE_safeVehicle and dayz_allowedObjects. Any idea if it needs to be added someplace else? As with the M2, I get the black screen and have to go to the lobby and come back before I can see again. *edit* It seems that the black screen is intermittent. I just deployed an M2 and I got the black screen again. I'm getting it with a DSHKM mounted gun too.... *edit 2* I apparently had the guns set to false for _simulation. Changed that to true and all seems ok now. Link to comment Share on other sites More sharing options...
Gr8 Posted June 3, 2015 Report Share Posted June 3, 2015 I've tried setting damage to 0, 0.9, 1 and -1 and I still get the option to disassemble. The disassemble option is not from the script. its an arma feature on certain static guns. Cant get rid of it :( Link to comment Share on other sites More sharing options...
Guest Posted June 3, 2015 Report Share Posted June 3, 2015 The disassemble option is not from the script. its an arma feature on certain static guns. Cant get rid of it :( If you find the function Name you can use "terminate" to kill that function but don't ask me where to look ^^ probably maybe just do a commandingMenu instead of addaction. At least that will disallow the disassembling option to pop up. Link to comment Share on other sites More sharing options...
pr0dukt Posted June 6, 2015 Report Share Posted June 6, 2015 If you find the function Name you can use "terminate" to kill that function but don't ask me where to look ^^ probably maybe just do a commandingMenu instead of addaction. At least that will disallow the disassembling option to pop up. There is an event handler called WeaponDisassembled SchwEde 1 Link to comment Share on other sites More sharing options...
Th3-Hunter333 Posted June 7, 2015 Report Share Posted June 7, 2015 I cannot seem to get this to work along side any towing and lifting script i have tried and would love to have a little help on this :( ive tried running logistic tow and lift and also am now running r3y tow and lift after removing logistic tow and lift. This script works fine until you add towing and lifting and then it breaks with no errors in rpt. I installed this script to the T along with the overwrites part of it Link to comment Share on other sites More sharing options...
pr0dukt Posted June 17, 2015 Report Share Posted June 17, 2015 player removeAllEventHandlers 'WeaponDisassembled'; that doesnt seem to work. The scroll menu for disassemble still shows up. its a big problem beucase disassembling will get you the bag back and after the restart the wep will appear again Link to comment Share on other sites More sharing options...
KraCKzzz Posted June 19, 2015 Report Share Posted June 19, 2015 this is definitly being placed in my server! Link to comment Share on other sites More sharing options...
Randomuser5050450494 Posted June 23, 2015 Report Share Posted June 23, 2015 Anyway to use this with DZGM? I cant get it working right. Ever since I downloaded this it overwrites the right click menu for the DZGM so it makes it unusable. Link to comment Share on other sites More sharing options...
ElDubya Posted June 23, 2015 Report Share Posted June 23, 2015 Anyway to use this with DZGM? I cant get it working right. Ever since I downloaded this it overwrites the right click menu for the DZGM so it makes it unusable. in overwrites/clickactions : ["Group Management","Group Management","execVM 'dzgm\loadGroupManagement.sqf';","true"], Don't forget to take the ItemRadio class out of your extra_rc.hpp. Link to comment Share on other sites More sharing options...
Recommended Posts