diff --git a/Server/@epochhive/addons/ud/$PREFIX$ b/Server/@epochhive/addons/ud/$PREFIX$ new file mode 100644 index 0000000..6ddf569 --- /dev/null +++ b/Server/@epochhive/addons/ud/$PREFIX$ @@ -0,0 +1 @@ +ud \ No newline at end of file diff --git a/Server/@epochhive/addons/ud/config.cpp b/Server/@epochhive/addons/ud/config.cpp new file mode 100644 index 0000000..56c8385 --- /dev/null +++ b/Server/@epochhive/addons/ud/config.cpp @@ -0,0 +1,21 @@ +class CfgPatches { + class ud { + units[] = {}; + weapons[] = {}; + UD_Version = 0.1; + requiredVersion = 1.36; + requiredAddons[] = {/*"a3_epoch_server"*/}; + }; +}; +class CfgFunctions { + class ud { + class main { + file = "ud"; + class udinit { + //preInit = 1; + postInit = 1; + }; + }; + class Deploy {}; + }; +}; diff --git a/Server/@epochhive/addons/ud/fn_deploybicycle.sqf b/Server/@epochhive/addons/ud/fn_deploybicycle.sqf new file mode 100644 index 0000000..143a30c --- /dev/null +++ b/Server/@epochhive/addons/ud/fn_deploybicycle.sqf @@ -0,0 +1,21 @@ +if(isServer) then { + "SPAZ2" addPublicVariableEventHandler {_this select 1 call Spawn_bike}; + + Spawn_bike = { + + private["_spawnPos","_spawnDir","_veh","_goat"]; + + _spawnPos = _this select 1; + _spawnDir = _this select 2; + _veh = createVehicle["MBK_01_EPOCH", _spawnPos, [], 0, "NONE"]; + _veh allowDamage false; + _veh setPos _spawnPos; + _veh setDir _spawnDir; + _veh setVectorUp (surfaceNormal (getPos _veh)); + _veh call EPOCH_server_setVToken; + _veh call EPOCH_server_vehicleInit; + _veh setVelocity [0,0,.1]; + _veh allowDamage true; + + }; +}; \ No newline at end of file diff --git a/Server/@epochhive/addons/ud/fn_deploybike.sqf b/Server/@epochhive/addons/ud/fn_deploybike.sqf new file mode 100644 index 0000000..21a863e --- /dev/null +++ b/Server/@epochhive/addons/ud/fn_deploybike.sqf @@ -0,0 +1,21 @@ +if(isServer) then { + "SPAZ" addPublicVariableEventHandler {_this select 1 call Spawn_Ebike}; + + Spawn_Ebike = { + + private["_spawnPos","_spawnDir","_veh","_goat"]; + + _spawnPos = _this select 1; + _spawnDir = _this select 2; + _veh = createVehicle["Ebike_Epoch", _spawnPos, [], 0, "NONE"]; + _veh allowDamage false; + _veh setPos _spawnPos; + _veh setDir _spawnDir; + _veh setVectorUp (surfaceNormal (getPos _veh)); + _veh call EPOCH_server_setVToken; + _veh call EPOCH_server_vehicleInit; + _veh setVelocity [0,0,.1]; + _veh allowDamage true; + + }; +}; \ No newline at end of file diff --git a/Server/@epochhive/addons/ud/fn_deploymozzie.sqf b/Server/@epochhive/addons/ud/fn_deploymozzie.sqf new file mode 100644 index 0000000..c472fce --- /dev/null +++ b/Server/@epochhive/addons/ud/fn_deploymozzie.sqf @@ -0,0 +1,20 @@ +if(isServer) then { + "UDMOZZIE" addPublicVariableEventHandler {_this select 1 call Spawn_Mozzie}; + + Spawn_Mozzie = {private["_playerObj","_spawnPos","_spawnDir","_veh","_goat"]; + _playerObj = _this select 0; + _spawnPos = _this select 1; + _spawnDir = _this select 2; + + _veh = createVehicle["Mosquito_Epoch", _spawnPos, [], 0, "NONE"]; + _veh allowDamage false; + _veh setPos _spawnPos; + _veh setDir _spawnDir; + _veh setVectorUp (surfaceNormal (getPos _veh)); + _veh call EPOCH_server_setVToken; + _veh call EPOCH_server_vehicleInit; + _veh setVelocity [0,0,.1]; + _veh allowDamage true; + }; + +}; \ No newline at end of file diff --git a/Server/@epochhive/addons/ud/fn_udinit.sqf b/Server/@epochhive/addons/ud/fn_udinit.sqf new file mode 100644 index 0000000..99da18b --- /dev/null +++ b/Server/@epochhive/addons/ud/fn_udinit.sqf @@ -0,0 +1,31 @@ +//Toggle Debug +Ud_VicDrop = True; +Ud_Bug = True; + + + +//////////DO NOT TOUCH BELOW//////////// + + + +diag_log "UD# Loading Init"; + +[] ExecVM "\ud\fn_deploybike.sqf"; +diag_log "UD# Deploy Bike Loaded: Ready to Deploy Ebike"; + +[] ExecVM "\ud\fn_deploymozzie.sqf"; +diag_log "UD# Deploy Mozzie Loaded: Ready to Deploy Mozzie"; + +[] ExecVM "\ud\fn_deploybicycle.sqf"; +diag_log "UD# Deploy Bicycle Loaded: Ready to Deploy Bicycle"; + +if !(isNil "UD") exitWith { false }; +UD = true; +diag_log 'UD: Checking for mission file'; +if (isClass (missionConfigFile >> 'Cfgmod')) then { + if (getNumber (missionConfigFile >> 'Cfgmod' >> 'override') == 1) then { + call compile preProcessFileLineNumbers (getText(missionConfigFile >> 'Cfgmod' >> 'file')); + }; +}; +diag_log 'UD: Load Completed'; +//call compile preprocessFileLineNumbers '\x\addons\a3_epoch_code\init\fn_init.sqf'; diff --git a/Server/mpmissions/epoch.Bornholm/epoch_config/Configs/CfgActionMenu/CfgActionMenu_self.hpp b/Server/mpmissions/epoch.Bornholm/epoch_config/Configs/CfgActionMenu/CfgActionMenu_self.hpp index 2afd7bc..5f32d28 100644 --- a/Server/mpmissions/epoch.Bornholm/epoch_config/Configs/CfgActionMenu/CfgActionMenu_self.hpp +++ b/Server/mpmissions/epoch.Bornholm/epoch_config/Configs/CfgActionMenu/CfgActionMenu_self.hpp @@ -13,6 +13,41 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_self.hpp */ +//Added by Zepheris +class spawn_Stuff +{ + condition = "true"; + action = ""; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\epoch_bluekey.paa"; + tooltip= "Spawn Stuff"; + + class spawn_bike + { + condition = "true"; + action = "execVM 'scripts\ud\spawn_bike.sqf';"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\epoch_brownkey.paa"; + tooltip = "Spawn Bike"; + }; + +/* + class spawn_mozzie + { + condition = "EPOCH_playerCrypto > 199"; + action = "execVM 'scripts\ud\spawn_mozzie.sqf';"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\epoch_coralkey.paa"; + tooltip = "Spawn Mozzie"; + }; + + class spawn_bicycle + { + condition = "true"; + action = "execVM 'scripts\ud\spawn_bicycle.sqf';"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\epoch_greenkey.paa"; + tooltip = "Spawn Bicycle"; + }; +*/ +}; + class veh_lock { condition = "if (vehicle player iskindof 'Bicycle') exitwith {false};dyna_inVehicle && !dyna_lockedInVehicle"; diff --git a/Server/mpmissions/epoch.Bornholm/scripts/ud/spawn_bicycle.sqf b/Server/mpmissions/epoch.Bornholm/scripts/ud/spawn_bicycle.sqf new file mode 100644 index 0000000..16d9741 --- /dev/null +++ b/Server/mpmissions/epoch.Bornholm/scripts/ud/spawn_bicycle.sqf @@ -0,0 +1,10 @@ +titleText ["", "PLAIN DOWN"]; +player playActionNow "Medic"; +_spawnPos = player modelToWorld [0,2,0]; +_spawnDir = (getDir player) -90; +SPAZ2 = [player, _spawnPos, _spawnDir]; +EPOCH_playerCrypto = EPOCH_playerCrypto - 50 ; +sleep 3; +publicVariableServer "SPAZ2"; +sleep 1; +['You spawned a bike. Gone at restart!',0,0.7,2,0] spawn bis_fnc_dynamictext; \ No newline at end of file diff --git a/Server/mpmissions/epoch.Bornholm/scripts/ud/spawn_bike.sqf b/Server/mpmissions/epoch.Bornholm/scripts/ud/spawn_bike.sqf new file mode 100644 index 0000000..32b58c5 --- /dev/null +++ b/Server/mpmissions/epoch.Bornholm/scripts/ud/spawn_bike.sqf @@ -0,0 +1,10 @@ +titleText ["", "PLAIN DOWN"]; +player playActionNow "Medic"; +_spawnPos = player modelToWorld [0,2,0]; +_spawnDir = (getDir player) -90; +SPAZ = [player, _spawnPos, _spawnDir]; +//EPOCH_playerCrypto = EPOCH_playerCrypto - 50 ; +sleep 3; +publicVariableServer "SPAZ"; +sleep 1; +['You spawned a bike!. Gone at restart!',0,0.7,2,0] spawn bis_fnc_dynamictext; \ No newline at end of file diff --git a/Server/mpmissions/epoch.Bornholm/scripts/ud/spawn_mozzie.sqf b/Server/mpmissions/epoch.Bornholm/scripts/ud/spawn_mozzie.sqf new file mode 100644 index 0000000..d0abf49 --- /dev/null +++ b/Server/mpmissions/epoch.Bornholm/scripts/ud/spawn_mozzie.sqf @@ -0,0 +1,10 @@ +titleText ["", "PLAIN DOWN"]; +player playActionNow "Medic"; +_spawnPos = player modelToWorld [0,2,0]; +_spawnDir = (getDir player) -90; +UDMOZZIE = [player, _spawnPos, _spawnDir]; +EPOCH_playerCrypto = EPOCH_playerCrypto - 200 ; +sleep 3; +publicVariableServer "UDMOZZIE"; +sleep 1; +['You bought a Mozzie for 200 crypto. Gone at restart!',0,0.7,2,0] spawn bis_fnc_dynamictext; \ No newline at end of file