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"];
};