Advertisement
KRDucky

CustomGroup2

Mar 14th, 2017
722
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.61 KB | None | 0 0
  1. // ******************************************************************************************
  2. // * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
  3. // ******************************************************************************************
  4. //  @file Name: customGroup2.sqf
  5. //  @file Author: AgentRev, JoSchaap
  6.  
  7. if (!isServer) exitWith {};
  8.  
  9. private ["_group", "_pos", "_nbUnits", "_unitTypes", "_uPos", "_unit"];
  10.  
  11. _group = _this select 0;
  12. _pos = _this select 1;
  13. _nbUnits = param [2, 7, [0]];
  14. _radius = param [3, 10, [0]];
  15.  
  16. _unitTypes =
  17. [
  18.     "C_man_hunter_1_F","C_man_p_beggar_F","C_man_p_beggar_F_afro",
  19.     "C_man_p_fugitive_F","C_man_p_shorts_1_F","C_man_polo_1_F",
  20.     "C_man_polo_2_F","C_man_polo_3_F","C_man_polo_4_F",
  21.     "C_man_p_beggar_F","C_man_p_beggar_F_afro",
  22.     "C_man_p_fugitive_F","C_journalist_F","C_Orestes",
  23.     "C_man_polo_5_F","C_man_polo_6_F","C_man_shorts_1_F",
  24.     "C_man_shorts_2_F","C_man_shorts_3_F","C_man_shorts_4_F",
  25.     "C_man_w_worker_F","C_man_p_beggar_F","C_man_p_beggar_F_afro",
  26.     "C_man_p_fugitive_F"
  27. ];
  28.  
  29. for "_i" from 1 to _nbUnits do
  30. {
  31.     _uPos = _pos vectorAdd ([[random _radius, 0, 0], random 360] call BIS_fnc_rotateVector2D);
  32.     _unit = _group createUnit [_unitTypes call BIS_fnc_selectRandom, _uPos, [], 0, "Form"];
  33.     _unit setPosATL _uPos;
  34.  
  35.     removeAllWeapons _unit;
  36.     removeAllAssignedItems _unit;
  37.     removeVest _unit;
  38.     removeBackpack _unit;
  39.     _unit call randomSoldierLoadOut;
  40.     _unit enablegunlights "forceOn";
  41.  
  42.     _unit addRating 1e11;
  43.     _unit spawn refillPrimaryAmmo;
  44.     _unit call setMissionSkill;
  45.     _unit addEventHandler ["Killed", server_playerDied];
  46. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement