From 66e5d9375fd3a06c8b200ba05ed192589d6836a0 Mon Sep 17 00:00:00 2001 From: He-Man Date: Tue, 3 Sep 2019 20:41:41 +0200 Subject: [PATCH] Added Craftable Bicycle into E-Pad --- @epochhive/addons/Ignatz_Server.pbo | Bin 4061 -> 5254 bytes .../Server/Ignatz_Server_CraftBike.sqf | 26 +++++++++++++ @epochhive/addons/Ignatz_Server/fn_init.sqf | 1 + Battleye.txt | 10 ++++- CfgEPad.hpp | 35 ++++++++++++++++++ CfgRemoteExec.hpp | 29 +++++++++++++++ README.md | 7 +++- epoch.Mission/init.sqf | 7 ++++ 8 files changed, 112 insertions(+), 3 deletions(-) create mode 100644 @epochhive/addons/Ignatz_Server/Server/Ignatz_Server_CraftBike.sqf create mode 100644 CfgEPad.hpp create mode 100644 CfgRemoteExec.hpp diff --git a/@epochhive/addons/Ignatz_Server.pbo b/@epochhive/addons/Ignatz_Server.pbo index 14cd7ecfb7ad9a615912ec9095ead933e7a80669..341040a84e09a9b8baf57a04938ac664b39b21e0 100644 GIT binary patch literal 5254 zcmc&&&2rnw5mvG%x=Oj`+JP!d(xMbnF8N@2Rb~CyR_)qWS+cegt_n2*hU8cP20Ivt z^0N2_x#f~;4#_o7kb6?Km7MYvx#j`VJwG5oQ@iqBB8w(~>FKY3zUgjgtx)`8ZRsah zd?aqyPR1G2--QKNH(af)MKT+S@phEwM*Pn|v%7wI^ta#9^(YHPCiHgk?Z_Y>{DwI-qNF%;@_4+@%VzP zLdXohfd2MiufFmuj%8L1FL7x$H!CGZrtx6PS-vEbvN8KkWV|8A(p1(Ju~JW@8eXF2 z;3eOB#j?O4(0}xyf0ZlG%Pi7p;tx1uWm6_Hn2`&ukw`e&9W=5K7$;mbD9cW`g-ki2 z+b_UIpk>`%GN~TL(B|pTkjbd=57Lxnad?Vpm`W8x3ysL#4dKuCFb@2dM;EUk@FXcL zWvq&C>{nQ)0PSqJvLF;19mzCDe@7x?37{{zk`XV8=lJX^%*5+5y}~5l1$T#DVqOi_ zn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7fofxza=7Y_)s@@r{J;=YV@S z!(oZ!=v~PCwS<;%VY#&6`{tsw+!Nmxk{WJ*(K=?vk;=mVlc&UryRzIM*;Aai%-=jb zmrQM{O>;|?;=WXKhsNrrB0v^Zy8YZ%uY705jO90pB{l>bg&P#T&b2@OX@B?opTGD! SYcsoB$Y0kgi7i*q4A^6kV2N)2!As-E2}M z->D0k(CCq+FU9F=qZjd;KfII6#Yn&&z1Zs+5m%ya#pk@o@L zkuT6P?T%>!A1pvAxIBS+8axT6VJ~8By6*Jc*~wS zff#Z>HM@{jRaHZbULnuZB-p82nK5*T6e_^A&{`BROpgFOs9rheqTK@F ziNaxM-lKHG2rO~J@$??Yda3LulOlM*&5}`LaL7ewklu0(+qq%gHHn0(Wo+n+9Ba7AB?Us|m zPTg#fsq#Vz9tlbKAl&l1%n%hZEQt!#$$ln29Dd2!$EFS5k=jV<2_x-G50uuO5f9uosS#{sy0bfIK-=HX~1u fD!Lqsxu#O-@~^_X!RJ5UGNr%Km*3ZlZ;bVS)ltR~ diff --git a/@epochhive/addons/Ignatz_Server/Server/Ignatz_Server_CraftBike.sqf b/@epochhive/addons/Ignatz_Server/Server/Ignatz_Server_CraftBike.sqf new file mode 100644 index 0000000..23e162d --- /dev/null +++ b/@epochhive/addons/Ignatz_Server/Server/Ignatz_Server_CraftBike.sqf @@ -0,0 +1,26 @@ +params ["_type","_player"]; +if (!isnull _player && alive _player) then { + _pos = _player modelToWorld [0,3,1]; + _pos set [2,(_pos select 2) max 1]; + _dir = getdir _player; + _randompos = [random 500, random 500, 1500]; + _vehObj = "MBK_01_EPOCH" createVehicle _randompos; + _vehObj allowdamage false; + _vehObj call EPOCH_server_setVToken; + clearWeaponCargoGlobal _vehObj; + clearMagazineCargoGlobal _vehObj; + clearBackpackCargoGlobal _vehObj; + clearItemCargoGlobal _vehObj; + _vehObj setdir (getdir _player); + _vehObj setvariable ["VehSpawnedBy",getplayeruid _player, true]; + _VectorUp = if (((getposatl _player) select 2) < 0.25) then {surfaceNormal _pos} else {[0,0,1]}; + _vehObj setVectorUp _VectorUp; + if (surfaceiswater _pos) then { + _vehObj setposasl _pos; + } + else { + _vehObj setposatl _pos; + }; + _vehObj setVectorUp _VectorUp; + [_vehObj, {player reveal _this}] remoteExec ["call", _player]; +}; diff --git a/@epochhive/addons/Ignatz_Server/fn_init.sqf b/@epochhive/addons/Ignatz_Server/fn_init.sqf index c8c5a89..4f9abf3 100644 --- a/@epochhive/addons/Ignatz_Server/fn_init.sqf +++ b/@epochhive/addons/Ignatz_Server/fn_init.sqf @@ -1 +1,2 @@ [] execVM "\Ignatz_server\Server\Server_Autolock.sqf"; +Ignatz_Server_CraftBike = compilefinal preprocessFileLineNumbers "\Ignatz_server\Server\Ignatz_Server_CraftBike.sqf"; diff --git a/Battleye.txt b/Battleye.txt index 7009863..2d2bd5b 100644 --- a/Battleye.txt +++ b/Battleye.txt @@ -1,4 +1,10 @@ scripts.txt: -7 "BIS_fnc_dynamictext" !="_Ignatz_dyn spawn BIS_fnc_dynamicText" -7 ctrlCreate !="_display ctrlCreate [\"RscStructuredText\", 10000]" +5 "BIS_fnc_dynamictext" !="_Ignatz_dyn spawn BIS_fnc_dynamicText" +5 ctrlCreate !="_display ctrlCreate [\"RscStructuredText\", 10000]" + +cfgremoteexec.txt: +5 "" !"ignatz_server_craftbike" + +deletevehicle.txt: +5 "" !"MBK_01_EPOCH" diff --git a/CfgEPad.hpp b/CfgEPad.hpp new file mode 100644 index 0000000..6d214b7 --- /dev/null +++ b/CfgEPad.hpp @@ -0,0 +1,35 @@ +class e_pad_config +{ + ... + class Apps + { + ... + + + + + + + class deploy + { + ButtonText = ""; + Description = "Craft a Bicycle"; + icon = "x\addons\a3_epoch_community\textures\MBK\mbk_picture_ca.paa"; + color[] = {1,1,1,1}; + colortoggled[] = {0,1,0,1}; + action = "if ({(_x getvariable ['VehSpawnedBy','']) isEqualTo (getplayeruid Player) && alive _x} count (entities 'MBK_01_EPOCH') > 0) exitwith {['Pack your Bicycle first, before crafting another one!',5] call Epoch_Message;};if !(player == vehicle player) exitwith {['Leave your Vehicle first!',5] call Epoch_Message;};if ((getpos player select 2) > 0.5) exitwith {['You have to be on the ground for this!',5] call Epoch_Message;};closedialog 0;[] spawn {player playMove 'AinvPknlMstpSnonWrflDnon_medic0';player playMove 'AinvPknlMstpSnonWrflDnon_medicEnd';uisleep 5;['MBK_01_EPOCH',player] remoteexec ['Ignatz_Server_CraftBike',2];};"; + Tooltip = "Craft a Bicycle"; + ToggleVar = ""; + ToggleAble = "false"; + }; + + + + + + + + + + }; +}; \ No newline at end of file diff --git a/CfgRemoteExec.hpp b/CfgRemoteExec.hpp new file mode 100644 index 0000000..efb9645 --- /dev/null +++ b/CfgRemoteExec.hpp @@ -0,0 +1,29 @@ +class CfgRemoteExec +{ + class Functions + { + ... + + + + + + + + class Ignatz_Server_CraftBike + { + allowedTargets=2; + jip = 0; + }; + + + + + + + + + ... + }; + ... +}; \ No newline at end of file diff --git a/README.md b/README.md index 0e55e63..e31a6a0 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,16 @@ - Autmatic Door Opener - Install: - copy the files from epoch.mission into your mission file (if init.sqf already exist, paste the code into this file) - - Add the following lines from CfgActionMenu_self.hpp into this file: "epoch.mission\epoch_config\Configs\CfgActionMenu\CfgActionMenu_self.hpp" + - Add the lines from CfgActionMenu_self.hpp into this file: "epoch.mission\epoch_config\Configs\CfgActionMenu\CfgActionMenu_self.hpp" + - Add the lines from CfgEPad.hpp into this file: "epoch.mission\epoch_config\Configs\CfgEPad.hpp" + - Add the lines from CfgRemoteExec.hpp into this file: "epoch.mission\epoch_config\Configs\CfgRemoteExec.hpp" - Put your servercomandpassword in @epochhive\addons\ignatz_server\config.cpp - All other Settings are in Epoch.Mission\ignatz_config.hpp Changelog: +- 2019-09-03 + - Added Craftable Bicycles into the E-Pad + - 2018-05-28 - Added WoodWall and MetalWall Garage to openable objs for Dooropener \ No newline at end of file diff --git a/epoch.Mission/init.sqf b/epoch.Mission/init.sqf index 763404b..18efdd7 100644 --- a/epoch.Mission/init.sqf +++ b/epoch.Mission/init.sqf @@ -4,4 +4,11 @@ if (hasInterface) then { [] execVM "addons\Ignatz_EarPlugs.sqf"; [] execVM "addons\Ignatz_Statusbar.sqf"; Ignatz_Client_DoorOpener = compilefinal preprocessfilelinenumbers "addons\Ignatz_Client_DoorOpener.sqf"; + waituntil {typeof player in ['Epoch_Male_F','Epoch_Female_F']}; + waituntil {!isNil 'Epoch_my_GroupUID'}; + while {true} do { + player addAction ["Pack Bicycle", {Ignatz_ActionInWork = true; cursortarget spawn {player playMove 'AinvPknlMstpSnonWrflDnon_medic0';player playMove 'AinvPknlMstpSnonWrflDnon_medicEnd';uisleep 5;deletevehicle _this;Ignatz_ActionInWork = false}}, nil, 1.5, false, true, "", "!(missionnamespace getvariable ['Ignatz_ActionInWork',false]) && {player distance cursortarget < 4} && {cursortarget getvariable ['VehSpawnedBy',''] isEqualTo (getplayeruid player)}", 3]; + waituntil {uisleep 1; !alive player}; + waituntil {alive player}; + }; }; \ No newline at end of file