Deployable bike, scroll wheel issue

Implemented this script, and it kills players..... Any idea? Tried looking inot the server_cleanup.fsm file, and there is nothing in there about check for hackers.
its definitely something to do with your cleanup... are you by chance running epoch? I believe there is a spot where you can make exceptions possibly in your init.sqf? with epoch.
 
Thanks for help bud, still nothing. Aparently ViLayer hates me
lol Ive done this for someones epoch server before... do you have a custom variables.sqf on your server?
If not.. open your dayz_code.pbo and find it and extract it. Put it on your server, call it in your compiles.sqf (if you don't have a custom compiles.sqf you need to do the same thing as the variables- find it in dayz_code put it on your server but then call it in your init.sqf) then when its on your server and you've called it correctly.. open it up. Find this...
Code:
DZE_safeVehicle = ["ParachuteWest","ParachuteC"];
and make it look like this
Code:
DZE_safeVehicle = ["ParachuteWest","ParachuteC","Old_bike_TK_CIV_EP1"];
or whatever the class name for the bicycle in the particular script you're using is called.. there are a few variants so just make sure its the right one and add it after the "ParachuteC" .... and a comma and then the class name in quotes, make sure you don't add another comma after the last set of quotes before the bracket.
 
Hey there any ides, i cant get this to spawn a bike The "Deploy Bike" option does show up in the scroll menu though.
 
This script works well on my Epoch Panthera server. Need help forcing the player to have one scrap and one tire in their inventory. I've added
player removeMagazine "PartGeneric";
player removeMagazine "PartWheel";
into the deploy.sqf but it does not force the player to require the parts. It will remove the parts if they are in the player inventory.

Need some kind of "if" statement to force the player to have the required parts, if not... it will fail with a message.
 
This script works well on my Epoch Panthera server. Need help forcing the player to have one scrap and one tire in their inventory. I've added
player removeMagazine "PartGeneric";
player removeMagazine "PartWheel";
into the deploy.sqf but it does not force the player to require the parts. It will remove the parts if they are in the player inventory.

Need some kind of "if" statement to force the player to have the required parts, if not... it will fail with a message.
This is actually kind of an old deploy bike script. I know theres one on epochmod.com somewhere that requires more parts and can also be upgraded to other vehicles. Good luck
 
Link DangerRuss is speaking of.... (thanks)
http://epochmod.com/forum/index.php?/topic/7848-release-deploy-bike-extendet/

Got it working by cutting some code from there. Player will need to have the toolbox, one scrap and one tire. Re-pack was unchanged. If player does not have the parts, they will have no mouse scroll option to build bike. Helps with keeping the mouse scroll option clean.

Ended up going this route as I was never able to add maca134's right click feature. If anyone is willing to help me with them... it would be much appreciated.

fn_selfActions.sqf

//BIKE DEPLOY
if ("ItemToolbox" in _weapons && "PartGeneric" 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=""#007ab7"">" + ("Deploy Bike") +"</t>"),"deploys\bike\deploy.sqf","",5,false,true,"", ""];
};
} else {
player removeAction s_player_deploybike;
s_player_deploybike = -1;
};

//PACK BIKE
if((_isBike) and _canDo) then {
if (s_player_deploybike2 < 0) then {
s_player_deploybike2 = player addaction[("<t color=""#007ab7"">" + ("Re-Pack Bike") +"</t>"),"deploys\bike\pack.sqf","",5,false,true,"", ""];
};
} else {
player removeAction s_player_deploybike2;
s_player_deploybike2 = -1;
};

deploy.sqf

if (false) then {
cutText [format["You are in combat and cannot build a bike."], "PLAIN DOWN"];
} else {
player removeAction s_player_deploybike;
player playActionNow "Medic";
r_interrupt = false;
player removeWeapon "ItemToolbox";
player removeMagazine "PartGeneric";
player removeMagazine "PartWheel";
_dis=10;
_sfx = "repair";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;

sleep 6;

_object = "Old_bike_TK_INS_EP1" createVehicle (position player);
_object setVariable ["ObjectID", "1", true];
_object setVariable ["ObjectUID", "1", true];

player reveal _object;

cutText [format["You've used your toolbox to build a bike!"], "PLAIN DOWN"];

r_interrupt = false;
player switchMove "";
player playActionNow "stop";

sleep 10;

cutText [format["Warning: Spawned bikes DO NOT SAVE after server restart!"], "PLAIN DOWN"];

};
 
Better pack.sqf (by ATD)

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"];};};
 
Ive used Maccas Right Click menu for self blood bag and that harvest weed script. Im sure I could help you set it up. The only problem with adding right click options instead of using scroll wheel options, from an admin standpoint, is players won't know that it's there unless they experiment or you tell them. In my experience, most people are unwilling to try and figure out the slightest thing for themselves without asking 100 questions, so having it in nice colorful letters on the scroll wheel is preferable.
 
I couldn't figure out how to get it to stop killing players on 1.8.3.
None of the previous code was in servercleainup.

turns out they moved it to its own at server/system/scheduler/sched_safetyVehicle.sqf

You could probably comment out the original code that calls for it (i didnt look), but i did the easy method of just commented the contents within the file out

Code:
//sched_safetyVehicle = {
//   {
//     if (vehicle _x != _x && !(vehicle _x in dayz_serverObjectMonitor) && (typeOf vehicle _x) != "ParachuteWest") then {
//       diag_log [ __FILE__, "KILLING A HACKER", name _x, " IN ", typeOf vehicle _x ];
//       (vehicle _x) setDamage 1;
//       _x setDamage 1;
//     };
//   } forEach allUnits;
//
//   objNull
//};

seems to have done that job.

Posting this incase someone else runs into the problem.
 
the correct (and just as easy method) would have been to add this line to your spawned bike script
_spawnedbike setvariable["SAFE", true];
and add this to your above pasted code
Code:
  if (vehicle _x != _x && !(vehicle _x in dayz_serverObjectMonitor) && (typeOf vehicle _x) != "ParachuteWest" || !(_x getvariable["SAFE",false])) then {
untested but should be correct, just added this to the end of the checks
|| !(_x getvariable["SAFE",false])

When I spawn in a vehicle I always add it to the dayz_serverObjectMonitor also but probably only need to use one or the other methods since this doesnt delete vehicles that in the dayz_serverobjectmonitor array
 
What happens is someone packs a normal spawned bicycle into a toolbox?

Does the server treat it as destroyed or? Im thinking maybe that could be caused my vehicle glitch i've been having the past couple of weeks. (vehicles not loading sometimes after restart, etc).
 
Last edited:
Back
Top