OmigaaaD Posted December 15, 2013 Report Share Posted December 15, 2013 Big up to maca134 for posting how to add custom right click options to items! I've made a simple script(s) that add right click upgrade/downgrade options to most of the guns with different variations, at the moment you only need scrap metal to upgrade and canvas to add camo to the M4 and SVD's. 1. Override player_selectSlot in your compiles.sqf 2. Replace your ui_selectSlot.sqf with http://pastebin.com/08rt8awZ 3. Add #include "OWS\ows.hpp" to your Description.ext. 4. Download http://d01.megashares.com/dl/BcfBloJ/OWS.rar and extract it to your mission file. 5. Compile your PBO and gooo. I know it is not the most well made script so feel free to edit or make it better, all I ask is that you share your fixes/changes :) I hope someone finds any use for this. Link to comment Share on other sites More sharing options...
Scenic Posted December 15, 2013 Report Share Posted December 15, 2013 I presume its simply adding the ability to turn a M4A1 into a M4A1 CCO? Link to comment Share on other sites More sharing options...
OmigaaaD Posted December 15, 2013 Author Report Share Posted December 15, 2013 Pretty much, M4A1 can be turned into the CCO, Holo, RCO. the M4A1 CCO can be turned into the CCO camo. The camo can be turned into the CCO SD and Holo camo and the Holo camo can be turned into the Holo SD. Link to comment Share on other sites More sharing options...
sparrow8332 Posted January 3, 2014 Report Share Posted January 3, 2014 download link is broke. Cant download (OWS\ows.hpp) Link to comment Share on other sites More sharing options...
Mr.Exodus Posted January 3, 2014 Report Share Posted January 3, 2014 I have never seen this before. Seems like a really cool idea. Could you fix the Download link so we can have a look at it ;) - Have you been running it on a open server? if so are there any downsides of this script. - does it run fine on the new epoch version 1.3.1? Link to comment Share on other sites More sharing options...
Halvhjearne Posted January 4, 2014 Report Share Posted January 4, 2014 this sounds interesting, but the download link is broken ... could you maybe fix this, so we can try it out? Link to comment Share on other sites More sharing options...
OmigaaaD Posted January 4, 2014 Author Report Share Posted January 4, 2014 Hey, Sorry for the broken link, I'll fix it asap edit: fixed now Reply to Mr. Exodus I have been running it on my 2 servers for a while now and I havent noticed any problems except people doesnt seem to use it haha Mr.Exodus 1 Link to comment Share on other sites More sharing options...
Mr.Exodus Posted January 4, 2014 Report Share Posted January 4, 2014 So cool!" Thx for sharing will look into it ASAP! Link to comment Share on other sites More sharing options...
BigDaddy Posted January 16, 2014 Report Share Posted January 16, 2014 hey, this is a nice script but i will more realistics, what must i change to need millitary flashlight and a windscreen too. if (("M4A1" in weapons player) && ("PartGeneric" in magazines player) && ("ItemToolbox" in items player)) then { player playActionNow "Medic"; sleep 2; if (("M4A1" in weapons player) && ("PartGeneric" in magazines player)) then { player removeWeapon "M4A1"; player removeMagazine "PartGeneric"; sleep 2; player addWeapon "M4A1_Aim"; } else { }; titleText ["You have attatched the Aimpoint Sight.","PLAIN DOWN"]; titleFadeOut 5; } else { titleText ["You don't have the required Tools/Items!","PLAIN DOWN"]; titleFadeOut 5; }; i hope anybody can help me cheers Link to comment Share on other sites More sharing options...
OtterNas3 Posted January 16, 2014 Report Share Posted January 16, 2014 Not tested! change "ItemFlashlight" to "ItemFlashlightRed" to use the military flashlight private ["_neededItems","_itemsPlayer","_hasItems"]; _itemsPlayer = items player; _itemsPlayer = _itemsPlayer + magazines player; _itemsPlayer = _itemsPlayer + weapons player; _neededItems = ["M4A1","ItemFlashLight","PartGeneric","ItemToolbox","PartGlass"]; _hasItems = {_x in _itemsPlayer} forEach _neededItems; if (_hasItems) then { player playActionNow "Medic"; sleep 2; player removeWeapon "M4A1"; player removeMagazine "PartGeneric"; player removeWeapon "ItemFlashlight"; player removeMagazine "PartGlass"; sleep 2; player addWeapon "M4A1_Aim"; titleText ["You have attatched the Aimpoint Sight.","PLAIN DOWN"]; titleFadeOut 5; } else { titleText ["You don't have the required Tools/Items!","PLAIN DOWN"]; titleFadeOut 5; }; or this way: private ["_neededItems","_itemsPlayer","_hasItems"]; _itemsPlayer = items player; _itemsPlayer = _itemsPlayer + magazines player; _itemsPlayer = _itemsPlayer + weapons player; _neededItems = ["M4A1","ItemFlashLight","PartGeneric","PartGlass"]; _hasItems = {_x in _itemsPlayer} forEach _neededItems; if (_hasItems && "ItemToolbox" in _itemsPlayer) then { player playActionNow "Medic"; {[player, _x, 1] call BIS_fnc_invRemove} forEach _neededItems; player addWeapon "M4A1_Aim"; titleText ["You have attatched the Aimpoint Sight.","PLAIN DOWN"]; titleFadeOut 5; } else { titleText ["You don't have the required Tools/Items!","PLAIN DOWN"]; titleFadeOut 5; }; Link to comment Share on other sites More sharing options...
BigDaddy Posted January 17, 2014 Report Share Posted January 17, 2014 thx a lot, both ways are work fine cheers Link to comment Share on other sites More sharing options...
BigDaddy Posted January 17, 2014 Report Share Posted January 17, 2014 ohh no it doesen´t work correctly i can craft with out the items Link to comment Share on other sites More sharing options...
thekaboobie Posted January 17, 2014 Report Share Posted January 17, 2014 disregard what I posted this code is dependant on another file and I would be hijacking this guys work if I posted it all in here. Link to comment Share on other sites More sharing options...
karamell Posted January 18, 2014 Report Share Posted January 18, 2014 is it possible to write this so u can add like silencer to a dmr? Link to comment Share on other sites More sharing options...
BigDaddy Posted January 19, 2014 Report Share Posted January 19, 2014 no you can only remove a weapon and add a weapon you change only the classname Link to comment Share on other sites More sharing options...
karamell Posted January 19, 2014 Report Share Posted January 19, 2014 what about the mod in dayz civilian is there any way to implement that in the game seen on that u can attatch silencer to the dmr and some other stuff aswell Link to comment Share on other sites More sharing options...
daftill Posted January 19, 2014 Report Share Posted January 19, 2014 Hey, nice script. works fine... is it possible to spawn a vehilce with that script? like with: "player createVehicle" or else. i dont know that right code Link to comment Share on other sites More sharing options...
Sandbird Posted January 19, 2014 Report Share Posted January 19, 2014 Hmm i seem to have a problem downgrading weapons. I could downgrade M16A4_ACG_GL -> M16A4_ACG But i cant downgrade M16A4_ACG to a M16A2. Same with M4A1CCO, cant upgrade to Camo...although i have a canvas on my backpack Link to comment Share on other sites More sharing options...
BigDaddy Posted January 19, 2014 Report Share Posted January 19, 2014 look for the classnames some are wrong if (("M16A4_ACG" in weapons player) && ("ItemToolbox" in items player)) then { player playActionNow "Medic"; sleep 2; if (("M16A4_ACG" in weapons player)) then { player removeWeapon "M16A4_ACG"; sleep 2; player addMagazine "PartGeneric"; player addWeapon "M16A2"; } else { }; titleText ["You have detatched the Acog Scope.","PLAIN DOWN"]; titleFadeOut 5; } else { titleText ["You don't have the required Tools/Items!","PLAIN DOWN"]; titleFadeOut 5; }; M16A4_ACG is wrong its M16A4_acg Link to comment Share on other sites More sharing options...
SideShowFreak Posted January 20, 2014 Report Share Posted January 20, 2014 hmm this starts me thinking again. I like the concept. Link to comment Share on other sites More sharing options...
BigDaddy Posted January 20, 2014 Report Share Posted January 20, 2014 hmm this starts me thinking again. I like the concept. if you want you can help me. write me a pm private ["_hasweapon","_hastool","_hastool2","_haspart","_haspart2"]; _hasweapon = "bizon" in weapons player; _hastool = "ItemToolbox" in items player; _hastool2 = "ItemKeyKit" in items Player; _haspart = "PartGeneric" in magazines player; _haspart2 = "ItemPole" in magazines player; if [_hasweapon && _hastool) then { sleep 1; if (_hasweapon && _hastool2) then { sleep 1; if (_hasweapon && _haspart) then { sleep 1; if (_hasweapon && _haspart2) then { player playActionNow "Medic"; [player,"repair",0,false] call dayz_zombieSpeak; player removeWeapon "bizon"; player removeMagazine "PartGeneric"; sleep 2; player addWeapon "bizon_silenced"; titleText ["You have attatched a suppressor!","PLAIN DOWN"]; titleFadeOut 5; } else { titleText ["dir fehlt metal pole","PLAIN DOWN"]; titleFadeOut 5; }; } else { titleText ["dir fehlt scrap metal","PLAIN DOWN"]; titleFadeOut 5; }; } else { titleText ["dir fehlt ein keymakerkit","PLAIN DOWN"]; titleFadeOut 5; }; } else { titleText ["dir fehlt eine toolbox","PLAIN DOWN"]; titleFadeOut 5; }; this is not working but when i use it without _hastool2 and _haspart2 it will work, anybody know why? sorry for my bad english and the bad script but it´s my first script cheers Link to comment Share on other sites More sharing options...
BigDaddy Posted January 21, 2014 Report Share Posted January 21, 2014 push Link to comment Share on other sites More sharing options...
BigDaddy Posted January 23, 2014 Report Share Posted January 23, 2014 push Link to comment Share on other sites More sharing options...
Judge Bread Posted January 25, 2014 Report Share Posted January 25, 2014 Spot the difference... _hastool = "ItemToolbox" in items player;_hastool2 = "ItemKeyKit" in items Player; Still nothing? Well you have player and Player. Link to comment Share on other sites More sharing options...
KamikazeXeX Posted January 27, 2014 Report Share Posted January 27, 2014 By "Override player_selectSlot in your compiles.sqf" does this mean completely comment it out? As theres no file to override with from what i can see EDIT: Think i just worked out what it means now, override it with the custom ui_selectSlot.sqf, just checked my compiles.sqf and ui_selectSlot.sqf is the file player_selectSlot executes ^_^ EDIT #2: Using the modified ui_selectSlot causes my server to hang, i guess its outdated for epoch 1.0.3.1? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now