Deployable bike, scroll wheel issue

OK guys, I've been trying to get this working... I can remove the bike but I can't get the bike to spawn... and I'm not sure exactly why..

I've also posted this on epoch.com to see if they have any ideas as well

I mean, EPOCH is all about the crafting, so I thought that this would be a good addon for my server, and as they don't save after restart,, it wouldn't clog up the DB with bikes either..
Now that bikes don't get a key from the traders either.... it just seemed like a logical step for the rebuilding storyline of EPOCH

Can someone point me in the right direction
Code:
// 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>"),"spawnbike\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>"),"spawnbike\bike.sqf","",5,false,true,"", ""];
    };
} else {
    player removeAction s_player_deploybike;
    s_player_deploybike = -1;
};
whats wrong here..
EDIT: after some more reading, its on the scrollwheel, but cant get the bike to work... all upgrades and repacks do though

Any suggestions would be appreciated

Bags
 
deploy.sqf:
Code:
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";
    _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! How magical!"], "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"];
 
};
//bike deploy script by Player2 - OpenDayz Release Coming Soon!

pack.sqf:
Code:
if (false) then {
    cutText [format["You are in combat and cannot re-pack your bike."], "PLAIN DOWN"];
} else {
    player removeAction s_player_deploybike2;
    player playActionNow "Medic";
    r_interrupt = false;
    player addWeapon "ItemToolbox";
    deletevehicle cursortarget;
    _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";
};

fn_selfActions.sqf:
Code:
_weapons = [currentWeapon player] + (weapons player) + (magazines player);
_isBike = typeOf cursorTarget in ["Old_bike_TK_INS_EP1","Old_bike_TK_CIV_EP1"];
 
//BIKE DEPLOY
if ("ItemToolbox" in _weapons) 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;
};
 
You you just need the right deploy files and then you add them to the fn_selfActions just like above.
 
I got it and you want to add a ' _object setVariable ["Sarge", "1", true];
then it will work and you don't have to worry about hackers.
 
deploy.sqf:
Code:
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";
    _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! How magical!"], "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"];
 
};
//bike deploy script by Player2 - OpenDayz Release Coming Soon!

pack.sqf:
Code:
if (false) then {
    cutText [format["You are in combat and cannot re-pack your bike."], "PLAIN DOWN"];
} else {
    player removeAction s_player_deploybike2;
    player playActionNow "Medic";
    r_interrupt = false;
    player addWeapon "ItemToolbox";
    deletevehicle cursortarget;
    _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";
};

fn_selfActions.sqf:
Code:
_weapons = [currentWeapon player] + (weapons player) + (magazines player);
_isBike = typeOf cursorTarget in ["Old_bike_TK_INS_EP1","Old_bike_TK_CIV_EP1"];
 
//BIKE DEPLOY
if ("ItemToolbox" in _weapons) 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;
};

I've got this to work fine only thing is after deploying the bike the "Deploy Bike" menu appears again and you can build infinite bikes.. anyone know why?
 
hey guys sorry real quick question i am new to coding i got it so it has the ability to scroll wheel deploy but when i click it it says cannot find deploys/Bike/deploy.sqf.do i have to right a file path in compiles or init so that it matches up with where i put pack and deploy.sqf that i made?
 
create a folder called deploys then create a folder inside deploys named Bike and put deploy.sqf inside of it.
 
On my server players are getting killed when they ride the bike.

server_cleanup.fsm comment out the check for hackers section

I got it and you want to add a ' _object setVariable ["Sarge", "1", true];
then it will work and you don't have to worry about hackers.

Help me out plz
 
deploy.sqf:
Code:
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";
    _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! How magical!"], "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"];
 
};
//bike deploy script by Player2 - OpenDayz Release Coming Soon!

pack.sqf:
Code:
if (false) then {
    cutText [format["You are in combat and cannot re-pack your bike."], "PLAIN DOWN"];
} else {
    player removeAction s_player_deploybike2;
    player playActionNow "Medic";
    r_interrupt = false;
    player addWeapon "ItemToolbox";
    deletevehicle cursortarget;
    _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";
};

fn_selfActions.sqf:
Code:
_weapons = [currentWeapon player] + (weapons player) + (magazines player);
_isBike = typeOf cursorTarget in ["Old_bike_TK_INS_EP1","Old_bike_TK_CIV_EP1"];
 
//BIKE DEPLOY
if ("ItemToolbox" in _weapons) 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;
};

cen, how do I use this with overwatch if there is no fn self actions?
 
you need to take it from the client files on your pc and put it in your mission pbo.
 
Back
Top