summaryrefslogtreecommitdiffstats
path: root/Server/PVFunctions/RequestWorker.sqf
diff options
context:
space:
mode:
authorhybrid <hybrid@hybridlabs.pro>2026-06-11 19:58:31 +0300
committerhybrid <hybrid@hybridlabs.pro>2026-06-11 19:58:31 +0300
commite670b4ed55c459a21090bd0178ceaaaf12d87989 (patch)
treeb6833d5e842475f0ee27f5f617096445fdd4e4a1 /Server/PVFunctions/RequestWorker.sqf
downloada2wf_fallujah-e670b4ed55c459a21090bd0178ceaaaf12d87989.tar.gz
a2wf_fallujah-e670b4ed55c459a21090bd0178ceaaaf12d87989.tar.bz2
a2wf_fallujah-e670b4ed55c459a21090bd0178ceaaaf12d87989.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