From de59022792681fdee4e90617de0e1c34c170b249 Mon Sep 17 00:00:00 2001 From: fallingsheep Date: Sun, 8 Feb 2015 19:20:44 +1100 Subject: [PATCH] Deploy and pack bike --- MPMissions/epoch.Altis.pbo | Bin 746200 -> 744204 bytes MPMissions/epoch.Altis/custom/bike.sqf | 46 ++++++++++---------- MPMissions/epoch.Altis/custom/packbike.sqf | 6 +++ MPMissions/epoch.Altis/custom/packbike2.sqf | 6 +++ MPMissions/epoch.Altis/init.sqf | 7 ++- 5 files changed, 41 insertions(+), 24 deletions(-) create mode 100644 MPMissions/epoch.Altis/custom/packbike.sqf create mode 100644 MPMissions/epoch.Altis/custom/packbike2.sqf diff --git a/MPMissions/epoch.Altis.pbo b/MPMissions/epoch.Altis.pbo index 9623b59fed93a05dfe3eb53d4c4b5fb6211aa6da..63b1c2428561f7445fdade34df3c8f7764231d02 100644 GIT binary patch delta 1018 zcmca{RJUiF?t}>5rz{L$aB|!Akf$3{)meE}m?0vww_XoXnLLx#%%dPNIXfvcJ5{f^ zFbyns0iuGT52y*mPA)Aj$YTfVe?zouN-Om`T;=m6r4Q0U3t0U zOA?FHQ%e+V6_QJfit~#?z+7vfL}oF_N}vQxNoKKkW?qVanu1a)NG3kDAU`=n38*wP zO+f>yTvMSWBQ>v@my2_9Wr4mb$Ra18S|v>dZ6zE15<4YL9VK+fPCi#4&s1x@`4OM* z@_GecE(MTzN}eUDxxvXri3P<<3YmEdxrynCRhfCI#R>&EiIu5E2#dg~L-O-;yfaG( zDCLCcRVYf$%`Z#!g&L`VWEUsMKb%0sIr-l17HGkd!ph-#cC1)|n1 z)d5kjw`+hX;T@W6oDhx9JJdKqOrTeQ5_#L?g*iFF?Bbl%)B*)#kPSd{w~5v#m1gFY zC?qO?f=Ev(R!2c8z{kO?UpCGx@U^4xO+3Be&393I+K6A@C{je J{ruMhy8%bNOwa%T delta 3123 zcmb_ePiP!f7&rgg?!aQfN-S#oIv{B^DcQs-A|dQ<{$jG(?ryS{5QeuiFT0POnKym& zCdsCRId~A%Ltzi42QPy4qDTmuRP>O8#~vl#1TTUhJ$drtdo#Pv>}DoOu>&7FJMZ^? z@B6;@{rl|ukzaovx&L8O>VLs|dcHj>NxNuh;Nqn||I6>+9F@d-^J#Lhxi|3I6`eqh zIP9iah{-xv1&cyaNo$)uz@tc120SY0R7fNWL1LmZ$|1R2r* zt06F5!F43B4Ffs9ke<(hsiksGUVA?&fuz)Y>+#hg{%h+9Szz4%2>657!F73_AtOsD zb*h4_IlF&l*wSGGQ9zMFHqauh!fk9K(1ny+r)zMOM(y=C?eHzmB<^6$h%cwInhSm%l`>YyE<5sx&X zw9#!Jx*VBkeT14ey@57NMGmJzgw31pk%bsZ_wnSwGS3p)}oMZg~1c6wfMz2%5ixsab7A8YRq1A^ch8!ecc z^6oohTengQ|LmU?jZLKl_U&8gY(5Ni1E&PMI&@66ro?K{wllXft4!yYvUA4|ZbPOm zqSgvf!(=oPo4 z6Mf*A+xSeWqO_(hn^=sOKwegslvzHD=ol3pucS%|5r1BPY|SHC+OYU|H37y)`QzV1 zFiCYrNV}(XG*CYBMWcj|k2g?>+uq`dX);02k4d&j^;7>T@7b^;X68hASZmK;*E*)P zosW#ekB!3~F1=j(xb$-w;Bt=3c`g^YB=(I%>C=ao`tJPoa5wYDPj`R0|L5!P)jzrV H#dq*u{BO-) 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";