diff --git a/MPMissions/epoch.Altis.pbo b/MPMissions/epoch.Altis.pbo index 9623b59..63b1c24 100644 Binary files a/MPMissions/epoch.Altis.pbo and b/MPMissions/epoch.Altis.pbo differ diff --git a/MPMissions/epoch.Altis/custom/bike.sqf b/MPMissions/epoch.Altis/custom/bike.sqf index 196367f..72643ad 100644 --- a/MPMissions/epoch.Altis/custom/bike.sqf +++ b/MPMissions/epoch.Altis/custom/bike.sqf @@ -2,29 +2,29 @@ //Script created by Bakler2 + + if ("ItemScraps" in magazines player) then{ + if ("ToolKit" in magazines player) then{ + player removeMagazine "ItemScraps"; + + _spawn = "ebike_epoch"; + _posplr = [((getPos player) select 0) + 2, ((getPos player) select 1) + 2, 0]; + _saveVehicle call EPOCH_server_save_vehicle; + _dirplr = getDir player; + _spwnveh = _spawn createVehicle (_posplr); + _spwnveh setVariable ["Sarge",1,true]; + _vehObj call EPOCH_server_save_vehicle; + + _vehObj call EPOCH_server_setVToken; + -cutText [format["You created the Ebike"], "PLAIN DOWN"]; - -player playActionNow "Medic"; - -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]; -_saveVehicle call EPOCH_server_save_vehicle; - _dirplr = getDir player; - _spwnveh = _spawn createVehicle (_posplr); - _spwnveh setVariable ["Sarge",1,true]; -_vehObj call EPOCH_server_save_vehicle; - - _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 { -SystemChat "You need one Corrugated to Ebike"; + SystemChat "You need one Scrap to build a Bike."; }; \ No newline at end of file diff --git a/MPMissions/epoch.Altis/custom/packbike.sqf b/MPMissions/epoch.Altis/custom/packbike.sqf new file mode 100644 index 0000000..a0318ce --- /dev/null +++ b/MPMissions/epoch.Altis/custom/packbike.sqf @@ -0,0 +1,6 @@ + +_target = cursorTarget; +_isbike = _target isKindOf "ebike_epoch"; +if (_isbike) then{ + player addaction [("" + ("PackBike") +""),"custom\packbike2.sqf","",5,false,true,"",""]; +}; \ No newline at end of file diff --git a/MPMissions/epoch.Altis/custom/packbike2.sqf b/MPMissions/epoch.Altis/custom/packbike2.sqf new file mode 100644 index 0000000..a2adbd5 --- /dev/null +++ b/MPMissions/epoch.Altis/custom/packbike2.sqf @@ -0,0 +1,6 @@ +_target = cursorTarget; +_isbike = _target typeof "EBike"; +if (_isbike) then{ + deleteVehicle _target; + player addMagazine "ItemScraps"; +}; \ No newline at end of file diff --git a/MPMissions/epoch.Altis/init.sqf b/MPMissions/epoch.Altis/init.sqf index ade4a1c..e8961a6 100644 --- a/MPMissions/epoch.Altis/init.sqf +++ b/MPMissions/epoch.Altis/init.sqf @@ -25,7 +25,12 @@ execVM "adminmenu\loop.sqf"; //BIKE act = player addaction [("" + ("Bike") +""),"custom\Bike.sqf","",5,false,true,"",""]; - +//Pack BIKE +_target = cursorTarget; +_isbike = _target isKindOf "ebike_epoch"; +if (_isbike) then{ + player addaction [("" + ("PackBike") +""),"custom\packbike2.sqf","",5,false,true,"",""]; +}; //Loadouts [] execVM "custom\loadout.sqf";