[NEW] Deploy + Pack Bike

Discussion in 'Tutorials' started by [AUR] Ace, Jun 23, 2014.

  1. [AUR] Ace

    [AUR] Ace New Member

    Joined:
    Aug 23, 2013
    Messages:
    11
    Likes Received:
    4
    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: Jul 24, 2014
  2. LTGNick

    LTGNick Valued Member!

    Joined:
    Feb 27, 2014
    Messages:
    480
    Likes Received:
    36
    Problem with the download is
    Even after registering
     
  3. [AUR] Ace

    [AUR] Ace New Member

    Joined:
    Aug 23, 2013
    Messages:
    11
    Likes Received:
    4
    Sincere apologies for that. I have now rectified the problem!
     
  4. FallingSheep

    FallingSheep OpenDayZ Lord!

    Joined:
    Mar 17, 2013
    Messages:
    1,982
    Likes Received:
    577
    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
     
  5. [AUR] Ace

    [AUR] Ace New Member

    Joined:
    Aug 23, 2013
    Messages:
    11
    Likes Received:
    4
    The post I made before this on my community's website gives credit to maca.
    Forgot to add it here too. Thanks!
     
    FallingSheep likes this.
  6. New Calpis

    New Calpis Well-Known Member

    Joined:
    Aug 1, 2013
    Messages:
    157
    Likes Received:
    8
    I get no click option on the toolbox. No idea why EDIT: Fixed
     
  7. [AUR] Ace

    [AUR] Ace New Member

    Joined:
    Aug 23, 2013
    Messages:
    11
    Likes Received:
    4
    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!
     
  8. New Calpis

    New Calpis Well-Known Member

    Joined:
    Aug 1, 2013
    Messages:
    157
    Likes Received:
    8
    One major problem, your can literally repack your bike from 100m away.
     
  9. Gorsy

    Gorsy Valued Member!

    Joined:
    Mar 29, 2013
    Messages:
    218
    Likes Received:
    52

    Lol, Actually the original was Player2, then everyone went and ripped it off :)
     
    SchwEde likes this.
  10. Pitbull

    Pitbull New Member

    Joined:
    Jul 1, 2014
    Messages:
    17
    Likes Received:
    0
    You download link does not work. please fix
     
  11. Pitbull

    Pitbull New Member

    Joined:
    Jul 1, 2014
    Messages:
    17
    Likes Received:
    0
    You download link is not working
     
  12. Pitbull

    Pitbull New Member

    Joined:
    Jul 1, 2014
    Messages:
    17
    Likes Received:
    0
    your file to download is corrupted
     
  13. Pitbull

    Pitbull New Member

    Joined:
    Jul 1, 2014
    Messages:
    17
    Likes Received:
    0
    still having problems with your download link
     
  14. [AUR] Ace

    [AUR] Ace New Member

    Joined:
    Aug 23, 2013
    Messages:
    11
    Likes Received:
    4
    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.
     
    alexlawson likes this.
  15. Tang0

    Tang0 Well-Known Member

    Joined:
    Apr 13, 2013
    Messages:
    157
    Likes Received:
    13
    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.
     
  16. [AUR] Ace

    [AUR] Ace New Member

    Joined:
    Aug 23, 2013
    Messages:
    11
    Likes Received:
    4
    You must register to download the file...
    Alternatively you could go HERE -> http://opendayz.net/resources/ and download the file attached there under my resource.
     
  17. Tang0

    Tang0 Well-Known Member

    Joined:
    Apr 13, 2013
    Messages:
    157
    Likes Received:
    13
    Thnx
     
    [AUR] Ace likes this.
  18. Geekin

    Geekin Valued Member!

    Joined:
    Jun 17, 2013
    Messages:
    372
    Likes Received:
    48
    players GO BOOM, after deploying bike
     
  19. [AUR] Ace

    [AUR] Ace New Member

    Joined:
    Aug 23, 2013
    Messages:
    11
    Likes Received:
    4
    Find this part in the tutorial I provided... That should have fixed it for the version this was for.
     

Share This Page