[fixed] When people ride bikes they die

alexlawson

OpenDayZ Rockstar!
When a player spawns a bike its all fine but they die once they get on it.

The code I use to execute the script.

Code:
//Deploy Bike
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=""#007ab7"">" + ("Re-Pack Bike") +"</t>"),"custom\deploy_bike\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=""#007ab7"">" + ("Deploy Bike (will loose Toolbox)") +"</t>"),"custom\deploy_bike\bike.sqf","",5,false,true,"", ""];
        };
} else {
        player removeAction s_player_deploybike;
        s_player_deploybike = -1;
};
 
Dayz_server
Server_functions.sqf:
"Killing a hacker"

You need to set a variable to the bikes and make an exception for this in the Server_functions. They are a lot of time examples of you search. Sarge did this with his sarge so choppers ;)

Also try to search next time because all of your last problems could've been resolved just by searching a bit ;P
 
diag_log ("CLEANUP: KILLING A HACKER " + (name _x) + " " + str(_x) + " IN " + (typeOf vehicle _x));
//(vehicle _x) setDamage 1;
//_x setDamage 1;

Add // in front of the setDamage lines.
 
diag_log ("CLEANUP: KILLING A HACKER " + (name _x) + " " + str(_x) + " IN " + (typeOf vehicle _x));
//(vehicle _x) setDamage 1;
//_x setDamage 1;

Add // in front of the setDamage lines.
Dirty way. Open up for hacker spawned vehicles ;)
 
Dayz_server
Server_functions.sqf:
"Killing a hacker"

You need to set a variable to the bikes and make an exception for this in the Server_functions. They are a lot of time examples of you search. Sarge did this with his sarge so choppers ;)

Also try to search next time because all of your last problems could've been resolved just by searching a bit ;P
Thanks for the tip ;)
 
  • Like
Reactions: bFe
Back
Top