[NEW] Deploy + Pack Bike

Deploy & Re-Pack Bike

DESCRIPTION:
  • This Script was made by [AUR]Ace (original by maca)
  • This allows you to add a right click option to a toolbox to deploy a pushbike
  • In addition, you are able to pack the back and get your toolbox back by using a scroll option
  • This script was made specially to avoid an annoying scroll option to deploy which may be accidentally clicked

FILES:

  • You will need to edit:
    • compiles.sqf
    • init.sqf
    • description.ext
    You will need to add:
    • ui_selectSlot.sqf
    • extra_rc.hpp
    • deploy.sqf
    • pack.sqf

INSTALLATION:
  1. Unpack your dayz_mission.pbo or any mission file you have. (May not be in PBO format)

  2. Only follow this step if you DON'T have a custom compiles.sqf or fn_selfAction.sqf already
    • Go to your "@DayZ\addons" folder and open dayz_code.pbo.
      Then copy compiles.sqf (in the init folder) and fn_selfAction.sqf (in the compile) folder, to your root mission folder (where init.sqf is located)

    • In your root mission folder, open init.sqf and change:

      Code:
      call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";
      to:

      Code:
      call compile preprocessFileLineNumbers "compiles.sqf";
    • Also in compiles.sqf, change:

      Code:
      fnc_usec_selfActions =        compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_selfActions.sqf";
      to:

      Code:
      fnc_usec_selfActions =        compile preprocessFileLineNumbers "fn_selfActions.sqf";
  3. Now open fn_selfActions.sqf from your root mission folder place this code at the bottom of it:

    Code:
    //----------PACK BIKE START----------
    _weapons = [currentWeapon player] + (weapons player) + (magazines player);
    _isBike = typeOf cursorTarget in ["Old_bike_TK_INS_EP1","Old_bike_TK_CIV_EP1"];
    
    if((_isBike) and _canDo) then {
    if (s_player_deploybike2 < 0) then {
            s_player_deploybike2 = player addaction[("<t color=""#007ab7"">" + ("Pack Bike") +"</t>"),"pack.sqf","",5,false,true,"", ""];
        };
    } else {
        player removeAction s_player_deploybike2;
        s_player_deploybike2 = -1;
    };
    //----------PACK BIKE END----------
  4. Now open compiles.sqf from your root mission folder and change:

    Code:
    player_selectSlot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_selectSlot.sqf";
    to:

    Code:
    player_selectSlot = compile preprocessFileLineNumbers "ui_selectSlot.sqf";
  5. Now open description.ext and place the following code at the bottom of it:

    Code:
    #include "extra_rc.hpp"
  6. Download the attached .zip file, and place the 4 files, loose inside the root mission folder (where init.sqf is located)
    http://www.aussierebels.org/phpBB3/ Go to Script Tutorials -> DayZMod (General) -> Deploy Bike Script

    NOTE: If you get killed when you get on the bike or deploy it:
    • Open server_functions.sqf from dayz_server.pbo and change:

      Code:
      server_checkHackers = {
         if (DZE_DYN_AntiStuck2nd > 3) then { DZE_DYN_HackerCheck = nil; DZE_DYN_AntiStuck2nd = 0; };
         if(!isNil "DZE_DYN_HackerCheck") exitWith {  DZE_DYN_AntiStuck2nd = DZE_DYN_AntiStuck2nd + 1;};
         DZE_DYN_HackerCheck = true;
         {
            if(vehicle _x != _x && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle)) then {
               //diag_log ("CLEANUP: KILLING A HACKER " + (name _x) + " " + str(_x) + " IN " + (typeOf vehicle _x));
               (vehicle _x) setDamage 1;
               _x setDamage 1;
               sleep 0.25;
            };
            sleep 0.001;
         } forEach allUnits;
         DZE_DYN_HackerCheck = nil;
      };
      to be commented out, like:

      Code:
      /*
      server_checkHackers = {
         if (DZE_DYN_AntiStuck2nd > 3) then { DZE_DYN_HackerCheck = nil; DZE_DYN_AntiStuck2nd = 0; };
         if(!isNil "DZE_DYN_HackerCheck") exitWith {  DZE_DYN_AntiStuck2nd = DZE_DYN_AntiStuck2nd + 1;};
         DZE_DYN_HackerCheck = true;
         {
            if(vehicle _x != _x && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle)) then {
               //diag_log ("CLEANUP: KILLING A HACKER " + (name _x) + " " + str(_x) + " IN " + (typeOf vehicle _x));
               (vehicle _x) setDamage 1;
               _x setDamage 1;
               sleep 0.25;
            };
            sleep 0.001;
         } forEach allUnits;
         DZE_DYN_HackerCheck = nil;
      };
      */
  7. Pack your mission file (if it was a PBO) and you are ready to go!
 
Last edited:

FallingSheep

OpenDayZ Lord!
I have modified the deploy bike to need confirmation before deploy to stop people spamming it (deploy bike really fast and you can keep doing it lol)

I'll post it tonight if I have time, maybe even later today if work is quiet

Also give credit to the ORIGINAL script creator as all you have done is change it to be right click not create it from scratch
 
I have updated this with a fix for those getting kicked or killed when getting on the bike...
Be sure to re-read it and fix server_functions.sqf!!! :)

This script has had lots of downloads on OpenDayZ and our forum, so thanks!
 
Pitbull, I don't appreciate the SPAM... Are you just trying to get your post count up or something?
The download link works perfectly, as does the file. It is not corrupt.
The site was being moved to a new host yesterday so that may have been the issue.
Please refrain from mass posts and now try again.
Btw, quoting those things had no relevance to your comment. You just quoted different parts for no reason.
 

Tang0

Well-Known Member
Actually hes right, when i go to the site to download the file i get

You do not have the required permissions to view the files attached to this post.
 
Top