From e670b4ed55c459a21090bd0178ceaaaf12d87989 Mon Sep 17 00:00:00 2001 From: hybrid Date: Thu, 11 Jun 2026 19:58:31 +0300 Subject: init --- Server/Config/Config_Town.sqf | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Server/Config/Config_Town.sqf (limited to 'Server/Config/Config_Town.sqf') diff --git a/Server/Config/Config_Town.sqf b/Server/Config/Config_Town.sqf new file mode 100644 index 0000000..35f5724 --- /dev/null +++ b/Server/Config/Config_Town.sqf @@ -0,0 +1,25 @@ +Private ['_configScripts','_location','_locationName','_params','_range','_script','_total']; + +_location = _this Select 0; +_locationName = _this Select 1; +_configScripts = _this Select 2; + +if (isNull _location) exitWith {}; + +waitUntil {townModeSet}; +if ((str _location) in TownTemplate) exitWith { + diag_log Format ["[WFBE (INIT)][frameno:%3 | ticktime:%4] Config_Town: Removing town %1 (%2) since the town is removed in the towns templates.",_location,_locationName,diag_frameno,diag_tickTime]; + if (isServer) then {deleteVehicle _location}; +}; + +_range = 600; +if (Count _this > 4) then {_range = _this Select 4}; + +_total = Count _configScripts; +_script = _configScripts Select (Random (_total - 1)); +_params = [_location,_locationName]; +if (Count _this > 4) then {_params = _params + [_range]}; + +waitUntil{initJIP && commonInitComplete}; + +_params ExecVM Format["Server\Config\Config_%1.sqf",_script]; \ No newline at end of file -- cgit v1.3.1