From 628d33984d9228f1781d13a65fbb80f35facc899 Mon Sep 17 00:00:00 2001 From: hybrid Date: Thu, 11 Jun 2026 19:55:24 +0300 Subject: init --- Server/PVFunctions/RequestWorker.sqf | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Server/PVFunctions/RequestWorker.sqf (limited to 'Server/PVFunctions/RequestWorker.sqf') 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 -- cgit v1.3.1