summaryrefslogtreecommitdiffstats
path: root/Server/PVFunctions/RequestWorker.sqf
diff options
context:
space:
mode:
authorhybrid <hybrid@hybridlabs.pro>2026-06-11 19:53:22 +0300
committerhybrid <hybrid@hybridlabs.pro>2026-06-11 19:53:22 +0300
commitc055d44dcdb87e8db49fb23e632fc086aa44cce6 (patch)
tree7ac98d865915930bebc86b36b512a859c31538e5 /Server/PVFunctions/RequestWorker.sqf
downloada2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.tar.gz
a2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.tar.bz2
a2wf_zargabad-c055d44dcdb87e8db49fb23e632fc086aa44cce6.zip
init
Diffstat (limited to '')
-rw-r--r--Server/PVFunctions/RequestWorker.sqf19
1 files changed, 19 insertions, 0 deletions
diff --git a/Server/PVFunctions/RequestWorker.sqf b/Server/PVFunctions/RequestWorker.sqf
new file mode 100644
index 0000000..3c891dc
--- /dev/null
+++ b/Server/PVFunctions/RequestWorker.sqf
@@ -0,0 +1,19 @@
+Private["_group","_index","_model","_models","_position","_side","_unit"];
+
+_side = _this select 0;
+_position = _this select 1;
+_index = _this select 2;
+
+_models = Format ["WFBE_WORKERS_MODELS_%1",str _side] Call GetNamespace;
+_model = _models select (round(random((count _models)-1)));
+_group = createGroup _side;
+_position = [getPos _position, 30] Call GetSafePlace;
+_unit = [_model,_group,_position,_side] Call CreateMan;
+
+_group setSpeedMode "LIMITED";
+
+_workers = Call Compile Format ["WF_%1Workers",str _side];
+_workers set [_index, _unit];
+Call Compile Format ["WF_%1Workers = _workers; publicVariable 'WF_%1Workers';",str _side];
+
+[_unit,_side,_index] ExecFSM "Server\FSM\workers.fsm"; \ No newline at end of file