oOSmokyOo Posted February 27, 2014 Report Share Posted February 27, 2014 Hello Community, i have built something. Deploy Bike Extendet [updated 02.04.2014] (Tested on DayZ Epoch 1.0.4.2a with infiStar Antihax ) With this Script you can deploy Bike, Moped, Mozzie and a Little Bird! Quick Install Instructions: 1.Download and unpack the attacht Zip Archive. 2. Open your Mission.pbo and copy the deployables folder in it. 3. Open your "Custom" variables an find this line: DZE_safeVehicle = ["ParachuteWest","ParachuteC"]; and replace with this: DZE_safeVehicle = ["MH6J_EP1","CSJ_GyroC","TT650_Civ","MMT_Civ","ParachuteWest","ParachuteC"]; repack your Custom varibles.sqf 4. Open your custom fn_selfActions.sqf and ad at the VERY BOTTOM this: //--------------------------------------Deploy Bike---------------------------------- //-----------------------------------------Start-------------------------------------- _weapons = [currentWeapon player] + (weapons player) + (magazines player); _isBike = typeOf cursorTarget in ["MMT_Civ"]; //BIKE DEPLOY if ("ItemToolbox" in _weapons && "PartGeneric" in _mags && "PartWheel" in _mags && "PartWheel" in _mags) then { hasBikeItem = true; } else { hasBikeItem = false;}; if((speed player <= 1) && hasBikeItem && _canDo) then { if (s_player_deploybike < 0) then { s_player_deploybike = player addaction[("<t color="#4eff00"">" + ("Deploy Bike") +"</t>"),"deployables\mtbike\deploy.sqf","",5,false,true,"", "]; }; } else { player removeAction s_player_deploybike; s_player_deploybike = -1; }; //PACK BIKE if((_isBike && "ItemToolbox" in _weapons && (player distance cursorTarget < 10)) and _canDo) then { if (s_player_deploybike2 < 0) then { s_player_deploybike2 = player addaction[("<t color="#4eff00"">" + ("Re-Pack Bike") +"</t>"),"deployables\mtbike\pack.sqf","",5,false,true,"", "]; }; } else { player removeAction s_player_deploybike2; s_player_deploybike2 = -1; }; //--------------------------------------Deploy Bike---------------------------------- //------------------------------------------End-------------------------------------- //--------------------------------------Deploy Moped---------------------------------- //------------------------------------------Start------------------------------------- _weapons = [currentWeapon player] + (weapons player) + (magazines player); _isMoped = typeOf cursorTarget in ["TT650_Civ"]; //MOPED DEPLOY if ("ItemToolbox" in _weapons && "PartGeneric" in _mags && "PartGeneric" in _mags && "PartEngine" in _mags && "PartWheel" in _mags && "PartWheel" in _mags) then { hasMopedItem = true; } else { hasMopedItem = false;}; if((speed player <= 1) && hasMopedItem && _canDo) then { if (s_player_deploymoped < 0) then { s_player_deploymoped = player addaction[("<t color="#4eff00"">" + ("Deploy Moped") +"</t>"),"deployables\moped\deploy.sqf","",5,false,true,"", "]; }; } else { player removeAction s_player_deploymoped; s_player_deploymoped = -1; }; //PACK MOPED if((_isMoped && "ItemToolbox" in _weapons && (player distance cursorTarget < 10)) and _canDo) then { if (s_player_deploymoped2 < 0) then { s_player_deploymoped2 = player addaction[("<t color="#4eff00"">" + ("Re-Pack Moped") +"</t>"),"deployables\moped\pack.sqf","",5,false,true,"", "]; }; } else { player removeAction s_player_deploymoped2; s_player_deploymoped2 = -1; }; //--------------------------------------Deploy Moped----------------------------------- //-------------------------------------------End--------------------------------------- //--------------------------------------Deploy Mozzie---------------------------------- //------------------------------------------Start-------------------------------------- _weapons = [currentWeapon player] + (weapons player) + (magazines player); _isMozzie = typeOf cursorTarget in ["CSJ_GyroC"]; //MOZZIE DEPLOY if ("ItemToolbox" in _weapons && "PartGeneric" in _mags && "PartGeneric" in _mags && "PartEngine" in _mags && "ItemJerrycan" in _mags && "PartVRotor" in _mags) then { hasMozzieItem = true; } else { hasMozzieItem = false;}; if((speed player <= 1) && hasMozzieItem && _canDo) then { if (s_player_deploymozzie < 0) then { s_player_deploymozzie = player addaction[("<t color="#4eff00"">" + ("Deploy Mozzie") +"</t>"),"deployables\mozzie\deploy.sqf","",5,false,true,"", "]; }; } else { player removeAction s_player_deploymozzie; s_player_deploymozzie = -1; }; //PACK MOZZIE if((_isMozzie && "ItemToolbox" in _weapons && (player distance cursorTarget < 10)) and _canDo) then { if (s_player_deploymozzie2 < 0) then { s_player_deploymozzie2 = player addaction[("<t color="#4eff00"">" + ("Re-Pack Mozzie") +"</t>"),"deployables\mozzie\pack.sqf","",5,false,true,"", "]; }; } else { player removeAction s_player_deploymozzie2; s_player_deploymozzie2 = -1; }; //--------------------------------------Deploy Mozzie----------------------------------- //--------------------------------------------End--------------------------------------- //--------------------------------------Deploy Little Bird----------------------------- //---------------------------------------------Start----------------------------------- _weapons = [currentWeapon player] + (weapons player) + (magazines player); _isBird = typeOf cursorTarget in ["MH6J_EP1"]; //BIRD DEPLOY if ("ItemToolbox" in _weapons && "PartGeneric" in _mags && "PartGeneric" in _mags && "PartEngine" in _mags && "PartFueltank" in _mags && "PartVRotor" in _mags && "ItemFuelBarrel" in _mags && "PartGlass" in _mags && "PartGlass" in _mags) then { hasBirdItem = true; } else { hasBirdItem = false;}; if((speed player <= 1) && hasBirdItem && _canDo) then { if (s_player_deploybird < 0) then { s_player_deploybird = player addaction[("<t color="#4eff00"">" + ("Deploy Little Bird") +"</t>"),"deployables\bird\deploy.sqf","",5,false,true,"", "]; }; } else { player removeAction s_player_deploybird; s_player_deploybird = -1; }; //PACK BIRD if((_isBird && "ItemToolbox" in _weapons && (player distance cursorTarget < 10)) and _canDo) then { if (s_player_deploybird2 < 0) then { s_player_deploybird2 = player addaction[("<t color="#4eff00"">" + ("Re-Pack Little Bird") +"</t>"),"deployables\bird\pack.sqf","",5,false,true,"", "]; }; } else { player removeAction s_player_deploybird2; s_player_deploybird2 = -1; }; //--------------------------------------Deploy Little Bird---------------------------------- //-----------------------------------------------End---------------------------------------- Repack your Custom fn_selfActions.sqf Upload your Mission.pbo to your Server. Restart your Server and have Fun ;) Deploy Recipes: Bike: 1x Part Generic 2x Part Wheel Moped: 2x Part Generic 2x Part Wheel 1x Engine Part Mozzie: 2x Part Generic 1x Part Engine 1x Item Jerrycan (Full) 1x Main Rotor Little Bird: 2x Scrap Metall 2x Glass 1x Engine Part 1x Fuel Tank 1x Main Rotor 1x Fuel Barrel (Full) All Deployed Vehicles will be deleted after the next server restart! Special Thanks to /index.php?/user/4305-cen/">cen for better pack.sqf /applications/core/interface/file/attachment.php?id=442">deployables.zip deployables.zip kty9906, unrealPANDA, joemcoy and 4 others 7 Link to comment Share on other sites More sharing options...
cen Posted February 27, 2014 Report Share Posted February 27, 2014 For one, you did not create this. The original script for this came from Player2 on opendayz.net. Secondly, your pack.sqf is badly written and will delete any object that the user is looking at including buildings and built objects. Uro, williamjbrown, Anthraxx and 3 others 6 Link to comment Share on other sites More sharing options...
oOSmokyOo Posted February 27, 2014 Author Report Share Posted February 27, 2014 For one, you did not create this. The original script for this came from Player2 on opendayz.net. Secondly, your pack.sqf is badly written and will delete any object that the user is looking at including buildings and built objects. Link to comment Share on other sites More sharing options...
Anthraxx Posted February 27, 2014 Report Share Posted February 27, 2014 This is pretty damn bad! Secondly, your pack.sqf is badly written and will delete any object that the user is looking at including buildings and built objects. Link to comment Share on other sites More sharing options...
cen Posted February 27, 2014 Report Share Posted February 27, 2014 This is a much better method for pack.sqf: if (false) then { // player is in combat and cant pack his bike cutText [format["You are in combat and cannot re-pack your bike."], "PLAIN DOWN"]; } else { if (typeOf cursorTarget == "Old_bike_TK_INS_EP1" || typeOf cursorTarget == "Old_bike_TK_CIV_EP1") then { // player is looking at a bike and the target has a bike classname // delete it first to avoid player changing to another target deletevehicle cursorTarget; player removeAction s_player_deploybike2; player playActionNow "Medic"; r_interrupt = false; player addWeapon "ItemToolbox"; _dis=10; _sfx = "repair"; [player,_sfx,0,false,_dis] call dayz_zombieSpeak; [player,_dis,true,(getPosATL player)] spawn player_alertZombies; sleep 6; cutText [format["You have packed your bike and been given back your toolbox"], "PLAIN DOWN"]; r_interrupt = false; player switchMove ""; player playActionNow "stop"; } else { // player is not looking at a bike, or target does not have a bike classname cutText [format["You have to be facing your bike to re-pack it!"], "PLAIN DOWN"]; }; }; Buck0 1 Link to comment Share on other sites More sharing options...
ThePotatoeTree Posted March 2, 2014 Report Share Posted March 2, 2014 Where do i find custom variables? Link to comment Share on other sites More sharing options...
cen Posted March 2, 2014 Report Share Posted March 2, 2014 @DayZ_Epoch\addons\dayz_code.pbo\compile\variables.sqf Link to comment Share on other sites More sharing options...
oOSmokyOo Posted March 2, 2014 Author Report Share Posted March 2, 2014 Where do i find custom variables? Hi, look at this: Link to comment Share on other sites More sharing options...
Friendly Posted March 2, 2014 Report Share Posted March 2, 2014 can you add this to right click toolbox? Link to comment Share on other sites More sharing options...
LoadingSA Posted March 2, 2014 Report Share Posted March 2, 2014 can you add this to right click toolbox? This would be ideal, If anyone has a better method for the current ideration of epoch I would love a better posted "how to". Link to comment Share on other sites More sharing options...
cen Posted March 2, 2014 Report Share Posted March 2, 2014 You can do anything with right-click menus :) class ExtraRc { class ItemToolbox { class DeployBike { text = "Deploy Bike"; script = "execVM 'scripts\deploys\bike\deploy.sqf'"; }; }; class ItemBloodbag { class Use { text = "Use Bloodbag"; script = "execVM 'scripts\selfbloodbag\player_selfbloodbag.sqf'"; }; }; class Binocular_Vector { class Use { text = "Set View Distance"; script = "execVM 'scripts\viewdistance\viewdistance.sqf'"; }; }; class Binocular { class Use { text = "Set View Distance"; script = "execVM 'scripts\viewdistance\viewdistance.sqf'"; }; }; }; Reapz56 1 Link to comment Share on other sites More sharing options...
ThePotatoeTree Posted March 2, 2014 Report Share Posted March 2, 2014 @DayZ_Epoch\addons\dayz_code.pbo\compile\variables.sqf Link to comment Share on other sites More sharing options...
ThePotatoeTree Posted March 2, 2014 Report Share Posted March 2, 2014 Hi, look at this: Link to comment Share on other sites More sharing options...
Friendly Posted March 2, 2014 Report Share Posted March 2, 2014 You can do anything with right-click menus :) class ExtraRc { class ItemToolbox { class DeployBike { text = "Deploy Bike"; script = "execVM 'scripts\deploys\bike\deploy.sqf'"; }; }; class ItemBloodbag { class Use { text = "Use Bloodbag"; script = "execVM 'scripts\selfbloodbag\player_selfbloodbag.sqf'"; }; }; class Binocular_Vector { class Use { text = "Set View Distance"; script = "execVM 'scripts\viewdistance\viewdistance.sqf'"; }; }; class Binocular { class Use { text = "Set View Distance"; script = "execVM 'scripts\viewdistance\viewdistance.sqf'"; }; }; }; Reapz56 1 Link to comment Share on other sites More sharing options...
carl101 Posted March 3, 2014 Report Share Posted March 3, 2014 hi i have a couple of questions for the bike if i wanted it to just require a tool box in you gear would i change it to this if ("ItemToolbox" in _weapons) then { rather than if ("ItemToolbox" in _weapons && "PartGeneric" in _mags && "PartWheel" in _mags && "PartWheel" in _mags) then { and how would i get it to make the little bird stay after restart? wouldnt want people to put alot of work into finding parts just for it to vanish on restart cheers Link to comment Share on other sites More sharing options...
oOSmokyOo Posted March 3, 2014 Author Report Share Posted March 3, 2014 Hi, for Deploy Bike only with Toolbox do this: Open your fn_selfActions.sqf find this line: if ("ItemToolbox" in _weapons && "PartGeneric" in _mags && "PartWheel" in _mags && "PartWheel" in _mags) then { chhange to this: if ("ItemToolbox" in _weapons) then { Open your pack.sgf from Bike and change this: player addMagazine "PartGeneric"; player addMagazine "PartWheel"; player addMagazine "PartWheel"; to this: player addWeapon "ItemToolbox"; Open your deploy.sqf from Bike and change this: player removeMagazine "PartGeneric"; player removeMagazine "PartWheel"; player removeMagazine "PartWheel"; to this: player removeWeapon "ItemToolbox"; Link to comment Share on other sites More sharing options...
ThePotatoeTree Posted March 4, 2014 Report Share Posted March 4, 2014 Its not working for me, Server runs all that, I did exaclt what it said and not working. Am i supose to scroll? = Not working Link to comment Share on other sites More sharing options...
Sukkaed Posted March 4, 2014 Report Share Posted March 4, 2014 Delete cursorTarget is bad method anyway. Even if you check if the target is what it needs to be. Best way is to set variable to that vehicle when it's build and use it later to delete the object. Halvhjearne 1 Link to comment Share on other sites More sharing options...
king0fsin Posted March 5, 2014 Report Share Posted March 5, 2014 so i also need a tool box to repack it? how can i make it so they dont need a toolbox to repack it Link to comment Share on other sites More sharing options...
Phone_Guy Posted March 5, 2014 Report Share Posted March 5, 2014 I like this script, any chance though it could be modified via "attachto" to allow the player to position the item then build? If so I could see allot of potential for the script. Link to comment Share on other sites More sharing options...
Scaramanga Posted March 6, 2014 Report Share Posted March 6, 2014 I might be wrong since my ARMA scripting skills are non existing, but will this script work if you don't already have Self Blood Bag installed? Won't you need _mags = magazines player; somewhere in there? Or is this variable in some way populated from _weapons = [currentWeapon player] + (weapons player) + (magazines player); Anyways, I've added building bike and gyro to Toolbox right-click menu, but I haven't gotten the check for needed items to work when running from the deploy script. Anyone got this working? Link to comment Share on other sites More sharing options...
Dactyl Posted March 6, 2014 Report Share Posted March 6, 2014 Hello Community, i have built something. Deploy Bike Extendet [updated 02.03.2014] (Tested on DayZ Epoch 1.0.4.2a and Temporary vehicles despawning/blowing up fix) With this Script you can deploy Bike, Moped, Mozzie and a Little Bird! Quick Install Instructions: 1.Download and unpack the attacht Zip Archive. 2. Open your Mission.pbo and copy the deployables folder in it. 3. Open your "Custom" variables an find this line: DZE_safeVehicle = ["ParachuteWest","ParachuteC"]; and replace with this: DZE_safeVehicle = ["MH6J_EP1","CSJ_GyroC","TT650_Civ","MMT_Civ","ParachuteWest","ParachuteC"]; repack your Custom varibles.sqf 4. Open your custom fn_selfActions.sqf and ad at the VERY BOTTOM this: //--------------------------------------Deploy Bike---------------------------------- //-----------------------------------------Start-------------------------------------- _weapons = [currentWeapon player] + (weapons player) + (magazines player); _isBike = typeOf cursorTarget in ["MMT_Civ"]; //BIKE DEPLOY if ("ItemToolbox" in _weapons && "PartGeneric" in _mags && "PartWheel" in _mags && "PartWheel" in _mags) then { hasBikeItem = true; } else { hasBikeItem = false;}; if((speed player <= 1) && hasBikeItem && _canDo) then { if (s_player_deploybike < 0) then { s_player_deploybike = player addaction[("<t color=""#4eff00"">" + ("Deploy Bike") +"</t>"),"deployables\mtbike\deploy.sqf","",5,false,true,"", ""]; }; } else { player removeAction s_player_deploybike; s_player_deploybike = -1; }; //PACK BIKE if((_isBike && "ItemToolbox" in _weapons) and _canDo) then { if (s_player_deploybike2 < 0) then { s_player_deploybike2 = player addaction[("<t color=""#4eff00"">" + ("Re-Pack Bike") +"</t>"),"deployables\mtbike\pack.sqf","",5,false,true,"", ""]; }; } else { player removeAction s_player_deploybike2; s_player_deploybike2 = -1; }; //--------------------------------------Deploy Bike---------------------------------- //------------------------------------------End-------------------------------------- //--------------------------------------Deploy Moped---------------------------------- //------------------------------------------Start------------------------------------- _weapons = [currentWeapon player] + (weapons player) + (magazines player); _isMoped = typeOf cursorTarget in ["TT650_Civ"]; //MOPED DEPLOY if ("ItemToolbox" in _weapons && "PartGeneric" in _mags && "PartGeneric" in _mags && "PartEngine" in _mags && "PartWheel" in _mags && "PartWheel" in _mags) then { hasMopedItem = true; } else { hasMopedItem = false;}; if((speed player <= 1) && hasMopedItem && _canDo) then { if (s_player_deploymoped < 0) then { s_player_deploymoped = player addaction[("<t color=""#4eff00"">" + ("Deploy Moped") +"</t>"),"deployables\moped\deploy.sqf","",5,false,true,"", ""]; }; } else { player removeAction s_player_deploymoped; s_player_deploymoped = -1; }; //PACK MOPED if((_isMoped && "ItemToolbox" in _weapons) and _canDo) then { if (s_player_deploymoped2 < 0) then { s_player_deploymoped2 = player addaction[("<t color=""#4eff00"">" + ("Re-Pack Moped") +"</t>"),"deployables\moped\pack.sqf","",5,false,true,"", ""]; }; } else { player removeAction s_player_deploymoped2; s_player_deploymoped2 = -1; }; //--------------------------------------Deploy Moped----------------------------------- //-------------------------------------------End--------------------------------------- //--------------------------------------Deploy Mozzie---------------------------------- //------------------------------------------Start-------------------------------------- _weapons = [currentWeapon player] + (weapons player) + (magazines player); _isMozzie = typeOf cursorTarget in ["CSJ_GyroC"]; //MOZZIE DEPLOY if ("ItemToolbox" in _weapons && "PartGeneric" in _mags && "PartGeneric" in _mags && "PartEngine" in _mags && "ItemJerrycan" in _mags && "PartVRotor" in _mags) then { hasMozzieItem = true; } else { hasMozzieItem = false;}; if((speed player <= 1) && hasMozzieItem && _canDo) then { if (s_player_deploymozzie < 0) then { s_player_deploymozzie = player addaction[("<t color=""#4eff00"">" + ("Deploy Mozzie") +"</t>"),"deployables\mozzie\deploy.sqf","",5,false,true,"", ""]; }; } else { player removeAction s_player_deploymozzie; s_player_deploymozzie = -1; }; //PACK MOZZIE if((_isMozzie && "ItemToolbox" in _weapons) and _canDo) then { if (s_player_deploymozzie2 < 0) then { s_player_deploymozzie2 = player addaction[("<t color=""#4eff00"">" + ("Re-Pack Mozzie") +"</t>"),"deployables\mozzie\pack.sqf","",5,false,true,"", ""]; }; } else { player removeAction s_player_deploymozzie2; s_player_deploymozzie2 = -1; }; //--------------------------------------Deploy Mozzie----------------------------------- //--------------------------------------------End--------------------------------------- //--------------------------------------Deploy Little Bird----------------------------- //---------------------------------------------Start----------------------------------- _weapons = [currentWeapon player] + (weapons player) + (magazines player); _isBird = typeOf cursorTarget in ["MH6J_EP1"]; //BIRD DEPLOY if ("ItemToolbox" in _weapons && "PartGeneric" in _mags && "PartGeneric" in _mags && "PartEngine" in _mags && "PartFueltank" in _mags && "PartVRotor" in _mags && "ItemFuelBarrel" in _mags && "PartGlass" in _mags && "PartGlass" in _mags) then { hasBirdItem = true; } else { hasBirdItem = false;}; if((speed player <= 1) && hasBirdItem && _canDo) then { if (s_player_deploybird < 0) then { s_player_deploybird = player addaction[("<t color=""#4eff00"">" + ("Deploy Little Bird") +"</t>"),"deployables\bird\deploy.sqf","",5,false,true,"", ""]; }; } else { player removeAction s_player_deploybird; s_player_deploybird = -1; }; //PACK BIRD if((_isBird && "ItemToolbox" in _weapons) and _canDo) then { if (s_player_deploybird2 < 0) then { s_player_deploybird2 = player addaction[("<t color=""#4eff00"">" + ("Re-Pack Little Bird") +"</t>"),"deployables\bird\pack.sqf","",5,false,true,"", ""]; }; } else { player removeAction s_player_deploybird2; s_player_deploybird2 = -1; }; //--------------------------------------Deploy Little Bird---------------------------------- //-----------------------------------------------End---------------------------------------- Repack your Custom fn_selfActions.sqf Upload your Mission.pbo to your Server. Restart your Server and have Fun ;) Deploy Recipes: Bike: 1x Part Generic 2x Part Wheel Moped: 2x Part Generic 2x Part Wheel 1x Engine Part Mozzie: 2x Part Generic 1x Part Engine 1x Item Jerrycan (Full) 1x Main Rotor Little Bird: 2x Scrap Metall 2x Glass 1x Engine Part 1x Fuel Tank 1x Main Rotor 1x Fuel Barrel (Full) All Deployed Vehicles will be deleted after the next server restart! Special Thanks to cen for better pack.sqf i have another mod that says i need to post something at the VERY BOTTOM as well. any way around this? Link to comment Share on other sites More sharing options...
Dactyl Posted March 6, 2014 Report Share Posted March 6, 2014 Ok so the "Custom" variables is supose to be on compile.sqf? Or am i supose to make a variables.sqf from scratch? Im so confused. variables is located in dayz_code\init\variables Link to comment Share on other sites More sharing options...
Joeyy Posted March 6, 2014 Report Share Posted March 6, 2014 i have another mod that says i need to post something at the VERY BOTTOM as well. any way around this? At the "VERY BOTTOM" just means at the end of the file, this is so you don't accidently put it in a loop or that it gets called before anything else. You can have multiple scripts with calls at the bottom of a file. Dactyl 1 Link to comment Share on other sites More sharing options...
Dactyl Posted March 6, 2014 Report Share Posted March 6, 2014 At the "VERY BOTTOM" just means at the end of the file, this is so you don't accidently put it in a loop or that it gets called before anything else. You can have multiple scripts with calls at the bottom of a file. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now