Merge branch 'UD-Spawn'
This commit is contained in:
commit
2b141ef1ba
1
Server/@epochhive/addons/ud/$PREFIX$
Normal file
1
Server/@epochhive/addons/ud/$PREFIX$
Normal file
@ -0,0 +1 @@
|
||||
ud
|
21
Server/@epochhive/addons/ud/config.cpp
Normal file
21
Server/@epochhive/addons/ud/config.cpp
Normal file
@ -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 {};
|
||||
};
|
||||
};
|
21
Server/@epochhive/addons/ud/fn_deploybicycle.sqf
Normal file
21
Server/@epochhive/addons/ud/fn_deploybicycle.sqf
Normal file
@ -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;
|
||||
|
||||
};
|
||||
};
|
21
Server/@epochhive/addons/ud/fn_deploybike.sqf
Normal file
21
Server/@epochhive/addons/ud/fn_deploybike.sqf
Normal file
@ -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;
|
||||
|
||||
};
|
||||
};
|
20
Server/@epochhive/addons/ud/fn_deploymozzie.sqf
Normal file
20
Server/@epochhive/addons/ud/fn_deploymozzie.sqf
Normal file
@ -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;
|
||||
};
|
||||
|
||||
};
|
31
Server/@epochhive/addons/ud/fn_udinit.sqf
Normal file
31
Server/@epochhive/addons/ud/fn_udinit.sqf
Normal file
@ -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';
|
@ -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";
|
||||
|
@ -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;
|
10
Server/mpmissions/epoch.Bornholm/scripts/ud/spawn_bike.sqf
Normal file
10
Server/mpmissions/epoch.Bornholm/scripts/ud/spawn_bike.sqf
Normal file
@ -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;
|
10
Server/mpmissions/epoch.Bornholm/scripts/ud/spawn_mozzie.sqf
Normal file
10
Server/mpmissions/epoch.Bornholm/scripts/ud/spawn_mozzie.sqf
Normal file
@ -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;
|
Loading…
Reference in New Issue
Block a user