diff --git a/@epochhive/addons/Ignatz_Server.pbo b/@epochhive/addons/Ignatz_Server.pbo index 14cd7ec..341040a 100644 Binary files a/@epochhive/addons/Ignatz_Server.pbo and b/@epochhive/addons/Ignatz_Server.pbo differ 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