how to add Deploy bike and Gyro?

Discussion in 'Support and Release' started by Loganout, May 7, 2014.

  1. Loganout

    Loganout New Member

    Joined:
    Apr 26, 2014
    Messages:
    24
    Likes Received:
    0
  2. LTGNick

    LTGNick Valued Member!

    Joined:
    Feb 27, 2014
    Messages:
    480
    Likes Received:
    36
  3. Loganout

    Loganout New Member

    Joined:
    Apr 26, 2014
    Messages:
    24
    Likes Received:
    0
    Thank you.
    Now I'll start the tutorial and hope to succeed.

    You know inform, if the tutorial works in Overwatch?
     
  4. LTGNick

    LTGNick Valued Member!

    Joined:
    Feb 27, 2014
    Messages:
    480
    Likes Received:
    36
    I dont know if that tut works on overwatch but i do know that its possible to get it working
     
  5. Chris Atkins

    Chris Atkins Valued Member!

    Joined:
    Aug 28, 2013
    Messages:
    407
    Likes Received:
    52
    It works on Overwatch....I have it on my server.
     
    Loganout likes this.
  6. Loganout

    Loganout New Member

    Joined:
    Apr 26, 2014
    Messages:
    24
    Likes Received:
    0
  7. Chris Atkins

    Chris Atkins Valued Member!

    Joined:
    Aug 28, 2013
    Messages:
    407
    Likes Received:
    52
    Open your fn_selfactions.sqf.
    Around line 38 or so, you should see
    Code:
    _isPlant = typeOf _cursorTarget in Dayz_plants;
    Underneath that, add
    Code:
    _isBike = typeOf _cursorTarget in ["Old_bike_TK_INS_EP1","Old_bike_TK_CIV_EP1"];
    Then, look for this around line 48 or so
    Code:
    _canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
    and directly underneath, add

    Code:
    _hasToolbox =  "ItemToolbox" in items player;
    if((speed player <= 1) && cursorTarget isKindOf "Old_bike_TK_CIV_EP1" && _canDo) then {
    if (s_player_deploybike2 < 0) then {
            s_player_deploybike2 = player addaction[("<t color=""#4abba7"">" + ("Re-Pack Bike") +"</t>"),"Scripts\deploy\Bike2.sqf","",5,false,true,"", ""];
        };
    } else {
        player removeAction s_player_deploybike2;
        s_player_deploybike2 = -1;
    };
    
    if((speed player <= 1) && _hasToolbox && _canDo) then {
        if (s_player_deploybike < 0) then {
            s_player_deploybike = player addaction[("<t color=""#4abba7"">" + ("Deploy Bike") +"</t>"),"Scripts\deploy\Bike.sqf","",5,false,true,"", ""];
        };
    } else {
        player removeAction s_player_deploybike;
        s_player_deploybike = -1;
    };
    
    
    if((speed player <= 1) && _hasToolbox && _canDo) then {
        if (s_player_deploymoz < 0) then {
            s_player_deploymoz = player addaction[("<t color=""#4abba7"">" + ("Deploy Mozzie") +"</t>"),"Scripts\deploy\make_mozzie.sqf","",5,false,true,"", ""];
        };
    } else {
        player removeAction s_player_deploymoz;
        s_player_deploymoz = -1;
    };
    This will give you the ability to build a bike and a mozzie.

    Next, create a "scripts\deploy" folder in your mission pbo.
    Download this and place in the "scripts\deploy" folder.

    In order to prevent players from dying once they deploy a bike and get on, you will need to open your server pbo and then find the server_cleanup.fsm. Open your server_cleanup.fsm. Find this block of code
    Code:
    "//Check for hackers" \n
           "// {" \n
           " //     if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
           "//        diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
           " //          (vehicle _x) setDamage 1;" \n
           " //          _x setDamage 1;" \n
           "//     };" \n
           "// } forEach allUnits;" \n
           "" \n
    The // indicate that this block of code will be ignored. Otherwise your players will be killed when getting on the bike after it's deployed (this may have already been done when I setup your halo spawn).

    Now repack both your server and mission pbos.

    ***NOTE
    If you use infiSTAR AH you will need to white list these (2) actions
    Code:
    s_player_deploybike, s_player_deploymoz,
     
  8. Loganout

    Loganout New Member

    Joined:
    Apr 26, 2014
    Messages:
    24
    Likes Received:
    0
    Do not know what it'm doing wrong.
    But nothing appears.
     
  9. Chris Atkins

    Chris Atkins Valued Member!

    Joined:
    Aug 28, 2013
    Messages:
    407
    Likes Received:
    52
    You should have two folders, one called "scripts" and another called "deploy" The "deploy" folder goes inside the "scripts" folder. The files in my link above, all those SQF files go inside the "deploy" folder.

    Make sure that is how you have it setup. This is all done mission pbo.
     
  10. Loganout

    Loganout New Member

    Joined:
    Apr 26, 2014
    Messages:
    24
    Likes Received:
    0
    • Open your fn_selfactions.sqf.
    This file is in my @DayzOverwatch\Addons\dayz_code.pbo
    right ?
     
  11. Chris Atkins

    Chris Atkins Valued Member!

    Joined:
    Aug 28, 2013
    Messages:
    407
    Likes Received:
    52
    I forgot to give you instructions on how to use the modified fn_selfActions.sqf. I'll type them up when I get to work in an hour.
     
  12. hawkz720

    hawkz720 New Member

    Joined:
    Jul 7, 2014
    Messages:
    1
    Likes Received:
    0
    i did this but does not work do i need to edit something in init ???
     

Share This Page