You've already forked arma2-epoch-server
Initial
This commit is contained in:
53
@DayZ_Epoch_Server/addons/dayz_server/init/mission_check.sqf
Executable file
53
@DayZ_Epoch_Server/addons/dayz_server/init/mission_check.sqf
Executable file
@ -0,0 +1,53 @@
|
||||
//Temporary check for A2OA mission override exploit.
|
||||
//This bug should be fixed in the next EOL patch.
|
||||
//Put this code at the bottom of dayz_server\init\server_functions.sqf
|
||||
|
||||
//List of files in your mission to check. For example, you may want to add 'custom\variables.sqf' etc.
|
||||
//Remove any you aren't using
|
||||
_files = [
|
||||
'description.ext','init.sqf','mission.sqm','rules.sqf'
|
||||
];
|
||||
|
||||
_list = [];
|
||||
{
|
||||
_file = toArray (toLower(preprocessFile _x));
|
||||
_sum = 0;
|
||||
_count = {_sum = _sum + _x; true} count _file;
|
||||
if (_count > 999999) then {_count = _count mod 999999}; //Prevent scientific notation when converting to string below
|
||||
if (_sum > 999999) then {_sum = _sum mod 999999};
|
||||
_list set [count _list,[_count,_sum]];
|
||||
} forEach _files;
|
||||
|
||||
//Check mission integrity on all clients
|
||||
_temp = "HeliHEmpty" createVehicle [0,0,0];
|
||||
_temp setVehicleInit (str formatText["
|
||||
if (isServer) exitWith {};
|
||||
|
||||
_list = [];
|
||||
{
|
||||
_file = toArray (toLower(preprocessFile _x));
|
||||
_sum = 0;
|
||||
_count = {_sum = _sum + _x; true} count _file;
|
||||
if (_count > 999999) then {_count = _count mod 999999};
|
||||
if (_sum > 999999) then {_sum = _sum mod 999999};
|
||||
_list set [count _list,[_count,_sum]];
|
||||
} forEach %1;
|
||||
|
||||
_file = -1;
|
||||
{
|
||||
if ((_x select 0 != (_list select _forEachIndex) select 0) or (_x select 1 != (_list select _forEachIndex) select 1)) then {
|
||||
_file = _forEachIndex;
|
||||
};
|
||||
} forEach %2;
|
||||
|
||||
if (_file != -1) then {
|
||||
MISSION_CHECK = if ((_list select _file) select 0 < 49999) then {preprocessFileLineNumbers (%1 select _file)} else {'TOO BIG'};
|
||||
publicVariableServer 'MISSION_CHECK';
|
||||
[] spawn {
|
||||
uiSleep 1;
|
||||
{(findDisplay _x) closeDisplay 2;} count [0,8,12,18,46,70];
|
||||
};
|
||||
};
|
||||
",_files,_list]);
|
||||
|
||||
processInitCommands;
|
246
@DayZ_Epoch_Server/addons/dayz_server/init/server_functions.sqf
Executable file
246
@DayZ_Epoch_Server/addons/dayz_server/init/server_functions.sqf
Executable file
@ -0,0 +1,246 @@
|
||||
#include "\z\addons\dayz_server\adminTools\init.sqf"
|
||||
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
|
||||
|
||||
waitUntil {!isNil "bis_fnc_init"};
|
||||
|
||||
BIS_MPF_remoteExecutionServer = {
|
||||
if ((_this select 1) select 2 == "JIPrequest") then {
|
||||
[nil,(_this select 1) select 0,"loc",rJIPEXEC,[any,any,"per","execVM","ca\Modules\Functions\init.sqf"]] call RE;
|
||||
};
|
||||
};
|
||||
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_code\util\compile.sqf";
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_code\loot\init.sqf";
|
||||
|
||||
BIS_Effects_Burn = {};
|
||||
dayz_disconnectPlayers = [];
|
||||
dayz_serverKey = [59]; //makes sure client is kicked by publicvariableval.txt if they try to send it
|
||||
for "_i" from 1 to 12 do {
|
||||
dayz_serverKey set [_i, ceil(random 128)];
|
||||
};
|
||||
dayz_serverKey = toString dayz_serverKey;
|
||||
server_playerLogin = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerLogin.sqf";
|
||||
server_playerSetup = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSetup.sqf";
|
||||
server_onPlayerDisconnect = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_onPlayerDisconnect.sqf";
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\updateObject_functions.sqf";
|
||||
server_updateObject = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateObject.sqf";
|
||||
server_playerDied = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDied.sqf";
|
||||
server_publishObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishObject.sqf"; //Creates the object in DB
|
||||
server_deleteObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_deleteObj.sqf"; //Removes the object from the DB
|
||||
server_deleteObjDirect = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_deleteObjDirect.sqf"; //Removes the object from the DB, NO AUTH, ONLY CALL FROM SERVER, NO PV ACCESS
|
||||
server_playerSync = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSync.sqf";
|
||||
zombie_findOwner = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\zombie_findOwner.sqf";
|
||||
//server_Wildgenerate = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\zombie_Wildgenerate.sqf";
|
||||
base_fireMonitor = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\fire_monitor.sqf";
|
||||
spawnComposition = compile preprocessFileLineNumbers "ca\modules\dyno\data\scripts\objectMapper.sqf"; //"\z\addons\dayz_code\compile\object_mapper.sqf";
|
||||
server_sendToClient = compile preprocessFileLineNumbers "\z\addons\dayz_server\eventHandlers\server_sendToClient.sqf";
|
||||
server_verifySender = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_verifySender.sqf";
|
||||
|
||||
// EPOCH ADDITIONS
|
||||
server_swapObject = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_swapObject.sqf"; //Used to downgrade and upgrade Epoch buildables
|
||||
server_publishVeh = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishVehicle.sqf"; //Used to spawn random vehicles by server
|
||||
server_publishVeh2 = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishVehicle2.sqf"; //Used to purchase vehicles at traders
|
||||
server_publishVeh3 = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishVehicle3.sqf"; //Used for car upgrades
|
||||
server_tradeObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_tradeObject.sqf";
|
||||
server_deaths = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDeaths.sqf";
|
||||
server_maintainArea = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_maintainArea.sqf";
|
||||
server_checkIfTowed = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_checkIfTowed.sqf";
|
||||
server_handleSafeGear = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_handleSafeGear.sqf";
|
||||
server_spawnTraders = compile preprocessFile "\z\addons\dayz_server\compile\server_spawnTraders.sqf";
|
||||
server_updateGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\server_updateGroup.sqf";
|
||||
server_changeCode = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_changeCode.sqf";
|
||||
|
||||
spawn_ammosupply = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\spawn_ammosupply.sqf";
|
||||
spawn_mineveins = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\spawn_mineveins.sqf";
|
||||
spawn_roadblocks = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\spawn_roadblocks.sqf";
|
||||
spawn_vehicles = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\spawn_vehicles.sqf";
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\garage\init.sqf";
|
||||
|
||||
fnc_veh_setFixServer = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\veh_setFixServer.sqf"; //process the hit as a NORMAL damage (useful for persistent vehicles)
|
||||
|
||||
server_medicalSync = {
|
||||
local _player = _this select 0;
|
||||
local _array = _this select 1;
|
||||
|
||||
_player setVariable ["USEC_isDead",(_array select 0)]; //0
|
||||
_player setVariable ["NORRN_unconscious",(_array select 1)]; //1
|
||||
_player setVariable ["USEC_infected",(_array select 2)]; //2
|
||||
_player setVariable ["USEC_injured",(_array select 3)]; //3
|
||||
_player setVariable ["USEC_inPain",(_array select 4)]; //4
|
||||
_player setVariable ["USEC_isCardiac",(_array select 5)]; //5
|
||||
_player setVariable ["USEC_lowBlood",(_array select 6)]; //6
|
||||
_player setVariable ["USEC_BloodQty",(_array select 7)]; //7
|
||||
// _wounds; //8
|
||||
// [_legs,_arms]; //9
|
||||
_player setVariable ["unconsciousTime",(_array select 10)]; //10
|
||||
_player setVariable ["blood_type",(_array select 11)]; //11
|
||||
_player setVariable ["rh_factor",(_array select 12)]; //12
|
||||
_player setVariable ["messing",(_array select 13)]; //13
|
||||
_player setVariable ["blood_testdone",(_array select 14)]; //14
|
||||
};
|
||||
|
||||
vehicle_handleServerKilled = {
|
||||
local _unit = _this select 0;
|
||||
|
||||
[_unit,"killed",false,false,"SERVER",dayz_serverKey] call server_updateObject;
|
||||
_unit removeAllMPEventHandlers "MPKilled";
|
||||
_unit removeAllEventHandlers "Killed";
|
||||
_unit removeAllEventHandlers "HandleDamage";
|
||||
_unit removeAllEventHandlers "GetIn";
|
||||
_unit removeAllEventHandlers "GetOut";
|
||||
};
|
||||
|
||||
check_publishobject = {
|
||||
local _object = _this select 0;
|
||||
local _playername = _this select 1;
|
||||
local _allowed = false;
|
||||
|
||||
#ifdef OBJECT_DEBUG
|
||||
diag_log format["DEBUG: Checking if Object: %1 is allowed, published by %2",_object,_playername];
|
||||
#endif
|
||||
|
||||
if ((typeOf _object) in DayZ_SafeObjects || (_object getVariable ["EAT_Building",0] == 1)) then {
|
||||
//if ((typeOf _object) in DayZ_SafeObjects) then {
|
||||
_allowed = true;
|
||||
};
|
||||
|
||||
#ifdef OBJECT_DEBUG
|
||||
local _saveObject = "DayZ_SafeObjects";
|
||||
diag_log format["DEBUG: Object: %1 published by %2 is allowed by %3",_object,_playername,_saveObject];
|
||||
#endif
|
||||
|
||||
_allowed
|
||||
};
|
||||
|
||||
server_hiveWrite = {
|
||||
//diag_log ("ATTEMPT WRITE: " + _this);
|
||||
local _data = "HiveExt" callExtension _this;
|
||||
//diag_log ("WRITE: " +str(_data));
|
||||
};
|
||||
|
||||
server_hiveReadWrite = {
|
||||
local _key = _this;
|
||||
//diag_log ("ATTEMPT READ/WRITE: " + _key);
|
||||
local _data = "HiveExt" callExtension _key;
|
||||
//diag_log ("READ/WRITE: " +str(_data));
|
||||
local _resultArray = call compile str formatText["%1", _data];
|
||||
if (isNil "_resultArray") then {_resultArray = "HIVE CONNECTION ERROR";};
|
||||
_resultArray
|
||||
};
|
||||
|
||||
onPlayerDisconnected "[_uid,_name] call server_onPlayerDisconnect;";
|
||||
|
||||
server_getStatsDiff = {
|
||||
local _player = _this select 0;
|
||||
local _playerUID = _this select 1;
|
||||
local _result = [];
|
||||
local _statsArray = missionNamespace getVariable _playerUID;
|
||||
local _new = 0;
|
||||
local _old = 0;
|
||||
|
||||
if (isNil "_statsArray") exitWith {
|
||||
diag_log format["Server_getStatsDiff error: playerUID %1 not found on server",_playerUID];
|
||||
[0,0,0,0,0]
|
||||
};
|
||||
|
||||
{
|
||||
_new = _player getVariable [_x,0];
|
||||
_old = _statsArray select _forEachIndex;
|
||||
_result set [_forEachIndex, (_new - _old)];
|
||||
_statsArray set [_forEachIndex, _new]; //updates original var too
|
||||
} forEach ["humanity","zombieKills","headShots","humanKills","banditKills"];
|
||||
|
||||
#ifdef PLAYER_DEBUG
|
||||
diag_log format["Server_getStatsDiff - Object:%1 Diffs:%2 New:%3",_player,_result,_statsArray];
|
||||
#endif
|
||||
|
||||
_result
|
||||
};
|
||||
|
||||
//seems max is 19 digits
|
||||
dayz_objectUID2 = {
|
||||
local _dir = _this select 0;
|
||||
local _time = round diag_tickTime;
|
||||
if (_time > 99999) then {_time = round(random 99999);}; //prevent overflow if server isn't restarted
|
||||
local _key = "";
|
||||
local _position = _this select 1;
|
||||
_key = format["%1%2%3%4", round(_time + abs(_position select 0)), round(_dir), round(abs(_position select 1)), _time];
|
||||
_key;
|
||||
};
|
||||
|
||||
dayz_recordLogin = {
|
||||
local _key = format["CHILD:103:%1:%2:%3:",_this select 0,_this select 1,_this select 2];
|
||||
_key call server_hiveWrite;
|
||||
|
||||
local _status = call {
|
||||
if ((_this select 2) == 0) exitwith { "CLIENT LOADED & PLAYING" };
|
||||
if ((_this select 2) == 1) exitwith { "LOGIN PUBLISHING, Location " +(_this select 4) };
|
||||
if ((_this select 2) == 2) exitwith { "LOGGING IN" };
|
||||
if ((_this select 2) == 3) exitwith { "LOGGED OUT, Location " +(_this select 4) };
|
||||
};
|
||||
|
||||
local _name = if (typeName (_this select 3) == "ARRAY") then { toString (_this select 3) } else { _this select 3 };
|
||||
diag_log format["INFO - Player: %1(UID:%3/CID:%4) Status: %2",_name,_status,(_this select 0),(_this select 1)];
|
||||
};
|
||||
|
||||
generate_new_damage = {
|
||||
local _damage = ((random(DynamicVehicleDamageHigh-DynamicVehicleDamageLow))+DynamicVehicleDamageLow) / 100;
|
||||
_damage
|
||||
};
|
||||
|
||||
server_hiveReadWriteLarge = {
|
||||
local _key = _this;
|
||||
local _data = "HiveExt" callExtension _key;
|
||||
local _resultArray = call compile _data;
|
||||
_resultArray
|
||||
};
|
||||
|
||||
// coor2str: convert position to a GPS coordinates
|
||||
fa_coor2str = {
|
||||
local _pos = +(_this);
|
||||
if (count _pos < 1) then {
|
||||
_pos = [0,0];
|
||||
} else {
|
||||
if (count _pos < 2) then { _pos = [_pos select 0,0]; };
|
||||
};
|
||||
local _nearestCity = nearestLocations [_pos, ["NameCityCapital","NameCity","NameVillage","NameLocal"],1000];
|
||||
local _town = "Wilderness";
|
||||
if (count _nearestCity > 0) then {_town = text (_nearestCity select 0)};
|
||||
local _res = format["%1 [%2]", _town, mapGridPosition _pos];
|
||||
|
||||
_res
|
||||
};
|
||||
|
||||
// print player player PID and name. If name unknown then print UID.
|
||||
fa_plr2str = {
|
||||
local _y = _this;
|
||||
local _res = "nobody";
|
||||
if (!isNil "_y") then {
|
||||
local _name = _y getVariable ["bodyName", nil];
|
||||
if ((isNil "_name" OR {(_name == "")}) AND ({alive _y})) then { _name = name _y; };
|
||||
if (isNil "_name" OR {(_name == "")}) then { _name = "UID#"+(getPlayerUID _y); };
|
||||
_res = format["PID#%1(%2)", owner _y, _name ];
|
||||
};
|
||||
_res
|
||||
};
|
||||
|
||||
array_reduceSize = {
|
||||
local _array1 = _this select 0;
|
||||
local _array = _array1 - ["Hatchet_Swing","Crowbar_Swing","Machete_Swing","Bat_Swing","BatBarbed_Swing","BatNails_Swing","Fishing_Swing","Sledge_Swing","CSGAS"];
|
||||
local _count = _this select 1;
|
||||
local _num = count _array;
|
||||
if (_num > _count) then {
|
||||
_array resize _count;
|
||||
};
|
||||
_array
|
||||
};
|
||||
|
||||
// Precise base building 1.0.5
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\kk_functions.sqf";
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_server\eventHandlers\server_eventHandler.sqf";
|
||||
#include "mission_check.sqf"
|
||||
|
||||
#include "spawn_config.sqf"
|
||||
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\init.sqf";
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_server\DZMS\DZMSInit.sqf";
|
132
@DayZ_Epoch_Server/addons/dayz_server/init/spawn_config.sqf
Executable file
132
@DayZ_Epoch_Server/addons/dayz_server/init/spawn_config.sqf
Executable file
@ -0,0 +1,132 @@
|
||||
/*
|
||||
ESSV3 Server Side Config
|
||||
|
||||
For detailed information about these variables see:
|
||||
https://github.com/ebayShopper/ESSV3/blob/master/DOCUMENTATION.md
|
||||
*/
|
||||
class_level1 = ["0","0","0"];
|
||||
class_level2 = ["0","0","0"];
|
||||
class_level3 = ["0","0","0"];
|
||||
class_levelCount = 3; //If you add more class levels then increase this number.
|
||||
// To give higher level VIPs access to lower level VIP classes uncomment the two lines below:
|
||||
// class_level1 = class_level1 + class_level2 + class_level3;
|
||||
// class_level2 = class_level2 + class_level3;
|
||||
|
||||
#define VIP_ITEMS "HandRoadFlare","ItemBandage",2,"ItemPainkiller","ItemWaterbottle","FoodPistachio","ItemAntibiotic","ItemBloodbag","ItemEpinephrine","ItemMorphine" // constant example, these can be removed if they are not used below
|
||||
#define VIP_TOOLS "Binocular_Vector","NVGoggles","ItemCompass","ItemKnife","Itemmatchbox","Itemetool","ItemFlashlightRed","ItemWatch","ItemGPS"
|
||||
class_private = [ // These are only visible to players in their respective class levels
|
||||
["VIP Scout","Camo1_DZ","SurvivorW2_DZ",["30Rnd_556x45_Stanag",2,"15Rnd_9x19_M9SD",3,VIP_ITEMS],["M16A4_ACOG_DZ","M9_SD_DZ","Binocular_Vector"],"DZ_ALICE_Pack_EP1",[],[],1,0,0,"MeleeHatchet"],
|
||||
["VIP Specialist","Rocket_DZ","SurvivorW2_DZ",["100Rnd_762x51_M240",2,"15Rnd_9x19_M9SD",3,VIP_ITEMS],["Mk48_CCO_DZ","M9_SD_DZ","Binocular_Vector"],"DZ_British_ACU",[],[],2,0,0,"MeleeHatchet"],
|
||||
["VIP Sniper","Sniper1_DZ","SurvivorW2_DZ",["20Rnd_762x51_DMR",2,"15Rnd_9x19_M9SD",3,VIP_ITEMS],["DMR_DZ","M9_SD_DZ","Binocular_Vector"],"DZ_Backpack_EP1",[],[],3,0,0,"MeleeHatchet"]
|
||||
];
|
||||
class_customLoadout = [
|
||||
"12345678900000000", // ebay
|
||||
"0",
|
||||
"0"
|
||||
];
|
||||
class_customLoadouts = [ // These are only visible to their owner
|
||||
["ebay's Loadout","Bandit1_DZ","BanditW1_DZ",["100Rnd_762x51_M240",2,"15Rnd_9x19_M9SD",3,"Skin_Sniper1_DZ",VIP_ITEMS],["Mk48_CCO_DZ","M9_SD_DZ",VIP_TOOLS],"DZ_Backpack_EP1",["20Rnd_762x51_DMR",3],["DMR_DZ"],0,"MeleeHatchet"],
|
||||
[],
|
||||
[]
|
||||
];
|
||||
|
||||
spawn_level1 = ["0","0","0"];
|
||||
spawn_level2 = ["0","0","0"];
|
||||
spawn_level3 = ["0","0","0"];
|
||||
spawn_levelCount = 3; //If you add more spawn levels then increase this number.
|
||||
// To give higher level VIPs access to lower level VIP spawns uncomment the two lines below:
|
||||
// spawn_level1 = spawn_level1 + spawn_level2 + spawn_level3;
|
||||
// spawn_level2 = spawn_level2 + spawn_level3;
|
||||
|
||||
spawn_private = [ // These are only visible to players in their respective spawn levels
|
||||
//["VIP Base",[1607,7804,0],1,0],
|
||||
//["VIP Hideout",[12944,12767,0],2,0]
|
||||
];
|
||||
spawn_base = [
|
||||
"12345678900000000", // ebay
|
||||
"0",
|
||||
"0"
|
||||
];
|
||||
spawn_bases = [
|
||||
["ebay's base",[2300,15324,0]],
|
||||
[],
|
||||
[]
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
The function below returns all private classes, private spawns, class levels and spawn levels the player has access to.
|
||||
The player is sent this data when they respawn.
|
||||
*/
|
||||
spawn_config = {
|
||||
private ["_classes","_classLevel","_classLevels","_freshSpawn","_index","_playerUID","_return","_spawnLevel","_spawnLevels","_spawns"];
|
||||
|
||||
_freshSpawn = _this select 0;
|
||||
_playerUID = _this select 1;
|
||||
|
||||
if (!_freshSpawn) exitWith {false};
|
||||
_return = [[],[],[],[]];
|
||||
|
||||
_index = class_customLoadout find _playerUID;
|
||||
if (_index != -1) then {
|
||||
_classes = _return select 0;
|
||||
_classes set [0,(class_customLoadouts select _index)];
|
||||
_return set [0,_classes];
|
||||
};
|
||||
|
||||
_index = spawn_base find _playerUID;
|
||||
if (_index != -1) then {
|
||||
_spawns = _return select 1;
|
||||
_spawns set [0,(spawn_bases select _index)];
|
||||
_return set [1,_spawns];
|
||||
};
|
||||
|
||||
_classLevels = [];
|
||||
_spawnLevels = [];
|
||||
for "_i" from 1 to class_levelCount do {
|
||||
if (_playerUID in (call compile format["class_level%1",_i])) then {
|
||||
_classLevels set [count _classLevels,_i];
|
||||
};
|
||||
};
|
||||
for "_i" from 1 to spawn_levelCount do {
|
||||
if (_playerUID in (call compile format["spawn_level%1",_i])) then {
|
||||
_spawnLevels set [count _spawnLevels,_i];
|
||||
};
|
||||
};
|
||||
_return set [2,_classLevels];
|
||||
_return set [3,_spawnLevels];
|
||||
|
||||
{
|
||||
_classLevel = _x select 8;
|
||||
if (typeName _classLevel == "ARRAY") then {_classLevel = _x select 19;}; //Random
|
||||
if (_classLevel == 0 or {_playerUID in (call compile format["class_level%1",_classLevel])}) then {
|
||||
_classes = _return select 0;
|
||||
_classes set [count _classes,_x];
|
||||
_return set [0,_classes];
|
||||
};
|
||||
} forEach class_private;
|
||||
|
||||
{
|
||||
_spawnLevel = _x select 2;
|
||||
if (_spawnLevel == 0 or {_playerUID in (call compile format["spawn_level%1",_spawnLevel])}) then {
|
||||
_spawns = _return select 1;
|
||||
_spawns set [count _spawns,_x];
|
||||
_return set [1,_spawns];
|
||||
};
|
||||
} forEach spawn_private;
|
||||
|
||||
_return
|
||||
};
|
||||
|
||||
//Allow extra skins in vanilla
|
||||
if !(isClass (configFile >> "CfgWeapons" >> "Chainsaw")) then {
|
||||
AllPlayers = AllPlayers + [
|
||||
"Citizen3","CZ_Soldier_DES_EP1","Rocket_DZ","TK_INS_Soldier_EP1",
|
||||
"US_Soldier_EP1","Villager1","Worker1"
|
||||
];
|
||||
};
|
||||
|
||||
//Not defined in 1.8.8
|
||||
respawn_west_original = getMarkerPos "respawn_west";
|
Reference in New Issue
Block a user