Deploy and pack bike

This commit is contained in:
fallingsheep 2015-02-08 19:20:44 +11:00
parent cee4655681
commit de59022792
5 changed files with 41 additions and 24 deletions

Binary file not shown.

View File

@ -3,28 +3,28 @@
//Script created by Bakler2 //Script created by Bakler2
cutText [format["You created the Ebike"], "PLAIN DOWN"]; if ("ItemScraps" in magazines player) then{
if ("ToolKit" in magazines player) then{
player removeMagazine "ItemScraps";
player playActionNow "Medic"; _spawn = "ebike_epoch";
sleep 3;
if ("ItemCorrugated" in magazines player) then{
player removeMagazine "ItemCorrugated";
_spawn = "ebike_epoch";
_posplr = [((getPos player) select 0) + 2, ((getPos player) select 1) + 2, 0]; _posplr = [((getPos player) select 0) + 2, ((getPos player) select 1) + 2, 0];
_saveVehicle call EPOCH_server_save_vehicle; _saveVehicle call EPOCH_server_save_vehicle;
_dirplr = getDir player; _dirplr = getDir player;
_spwnveh = _spawn createVehicle (_posplr); _spwnveh = _spawn createVehicle (_posplr);
_spwnveh setVariable ["Sarge",1,true]; _spwnveh setVariable ["Sarge",1,true];
_vehObj call EPOCH_server_save_vehicle; _vehObj call EPOCH_server_save_vehicle;
_vehObj call EPOCH_server_setVToken; _vehObj call EPOCH_server_setVToken;
sleep 3;
cutText [format["You've used your Corrugated to build a Ebike."], "PLAIN DOWN"]; player playActionNow "Medic";
sleep 3;
cutText [format["You built a Bike."], "PLAIN DOWN"];
} else {
SystemChat "You need a Toolkit to build a bike Bike.";
};
} else { } else {
SystemChat "You need one Corrugated to Ebike"; SystemChat "You need one Scrap to build a Bike.";
}; };

View File

@ -0,0 +1,6 @@
_target = cursorTarget;
_isbike = _target isKindOf "ebike_epoch";
if (_isbike) then{
player addaction [("<t color=""#0074E8"">" + ("PackBike") +"</t>"),"custom\packbike2.sqf","",5,false,true,"",""];
};

View File

@ -0,0 +1,6 @@
_target = cursorTarget;
_isbike = _target typeof "EBike";
if (_isbike) then{
deleteVehicle _target;
player addMagazine "ItemScraps";
};

View File

@ -25,7 +25,12 @@ execVM "adminmenu\loop.sqf";
//BIKE //BIKE
act = player addaction [("<t color=""#0074E8"">" + ("Bike") +"</t>"),"custom\Bike.sqf","",5,false,true,"",""]; act = player addaction [("<t color=""#0074E8"">" + ("Bike") +"</t>"),"custom\Bike.sqf","",5,false,true,"",""];
//Pack BIKE
_target = cursorTarget;
_isbike = _target isKindOf "ebike_epoch";
if (_isbike) then{
player addaction [("<t color=""#0074E8"">" + ("PackBike") +"</t>"),"custom\packbike2.sqf","",5,false,true,"",""];
};
//Loadouts //Loadouts
[] execVM "custom\loadout.sqf"; [] execVM "custom\loadout.sqf";