diff options
| author | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:55:24 +0300 |
|---|---|---|
| committer | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:55:24 +0300 |
| commit | 628d33984d9228f1781d13a65fbb80f35facc899 (patch) | |
| tree | cd909141f87e14f22c3511549a9bc067d9ff8b50 /Server/Config/Config_Town.sqf | |
| download | a2wf_sara-628d33984d9228f1781d13a65fbb80f35facc899.tar.gz a2wf_sara-628d33984d9228f1781d13a65fbb80f35facc899.tar.bz2 a2wf_sara-628d33984d9228f1781d13a65fbb80f35facc899.zip | |
init
Diffstat (limited to '')
| -rw-r--r-- | Server/Config/Config_Town.sqf | 25 |
1 files changed, 25 insertions, 0 deletions
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 |
