Added Craftable Bicycle into E-Pad

This commit is contained in:
He-Man 2019-09-03 20:41:41 +02:00
parent 5d3a6b1199
commit 66e5d9375f
8 changed files with 112 additions and 3 deletions

Binary file not shown.

View File

@ -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];
};

View File

@ -1 +1,2 @@
[] execVM "\Ignatz_server\Server\Server_Autolock.sqf"; [] execVM "\Ignatz_server\Server\Server_Autolock.sqf";
Ignatz_Server_CraftBike = compilefinal preprocessFileLineNumbers "\Ignatz_server\Server\Ignatz_Server_CraftBike.sqf";

View File

@ -1,4 +1,10 @@
scripts.txt: scripts.txt:
7 "BIS_fnc_dynamictext" !="_Ignatz_dyn spawn BIS_fnc_dynamicText" 5 "BIS_fnc_dynamictext" !="_Ignatz_dyn spawn BIS_fnc_dynamicText"
7 ctrlCreate !="_display ctrlCreate [\"RscStructuredText\", 10000]" 5 ctrlCreate !="_display ctrlCreate [\"RscStructuredText\", 10000]"
cfgremoteexec.txt:
5 "" !"ignatz_server_craftbike"
deletevehicle.txt:
5 "" !"MBK_01_EPOCH"

35
CfgEPad.hpp Normal file
View File

@ -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";
};
};
};

29
CfgRemoteExec.hpp Normal file
View File

@ -0,0 +1,29 @@
class CfgRemoteExec
{
class Functions
{
...
class Ignatz_Server_CraftBike
{
allowedTargets=2;
jip = 0;
};
...
};
...
};

View File

@ -5,11 +5,16 @@
- Autmatic Door Opener - Autmatic Door Opener
- Install: - Install:
- copy the files from epoch.mission into your mission file (if init.sqf already exist, paste the code into this file) - 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 - Put your servercomandpassword in @epochhive\addons\ignatz_server\config.cpp
- All other Settings are in Epoch.Mission\ignatz_config.hpp - All other Settings are in Epoch.Mission\ignatz_config.hpp
Changelog: Changelog:
- 2019-09-03
- Added Craftable Bicycles into the E-Pad
- 2018-05-28 - 2018-05-28
- Added WoodWall and MetalWall Garage to openable objs for Dooropener - Added WoodWall and MetalWall Garage to openable objs for Dooropener

View File

@ -4,4 +4,11 @@ if (hasInterface) then {
[] execVM "addons\Ignatz_EarPlugs.sqf"; [] execVM "addons\Ignatz_EarPlugs.sqf";
[] execVM "addons\Ignatz_Statusbar.sqf"; [] execVM "addons\Ignatz_Statusbar.sqf";
Ignatz_Client_DoorOpener = compilefinal preprocessfilelinenumbers "addons\Ignatz_Client_DoorOpener.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};
};
}; };