-
Notifications
You must be signed in to change notification settings - Fork 0
/
ASE_CivilianPresence.sqf
29 lines (24 loc) · 1.96 KB
/
ASE_CivilianPresence.sqf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
Civilian Presence Module, spawna det man vill.
Om du vill spawna trovärdiga civs så behöver man ibland styra vad modulen väljer.
Usage 1: Lägg in koden i modulens "Code On Unit Created"-fält och ändra classes, faces godtyckligt.
Usage 2: Ändra direkt i filen och kör [_this] execVM "ace_utils\ASE_CivilianPresence.sqf" i "Code On Unit Created"-fältet.
@author Beck [ASE] - Discord Beck#1679
*/
params [["_this", _this]];
_classes = ["CFP_C_AFRISLAMIC_Civ_1_01", "CFP_C_AFRISLAMIC_Civ_2_01", "CFP_C_AFRISLAMIC_Civ_3_01", "CFP_C_AFRISLAMIC_Civ_4_01", "CFP_C_AFRISLAMIC_Civ_5_01", "CFP_C_AFRISLAMIC_Civ_6_01", "CFP_C_AFRISLAMIC_Civ_7_01", "CFP_C_AFRISLAMIC_Civ_8_01", "CFP_C_AFRISLAMIC_Civ_9_01", "CFP_C_AFRISLAMIC_Civ_10_01", "CFP_C_AFRISLAMIC_Civ_11_01","CFP_C_AFRISLAMIC_Civ_12_01", "CFP_C_AFRCHRISTIAN_Civ_1_01", "CFP_C_AFRCHRISTIAN_Civ_2_01", "CFP_C_AFRCHRISTIAN_Civ_3_01", "CFP_C_AFRCHRISTIAN_Civ_4_01", "CFP_C_AFRCHRISTIAN_Civ_5_01", "CFP_C_AFRCHRISTIAN_Civ_6_01", "CFP_C_AFRCHRISTIAN_Civ_7_01", "CFP_C_AFRCHRISTIAN_Civ_8_01", "CFP_C_AFRCHRISTIAN_Civ_9_01", "CFP_C_AFRCHRISTIAN_Civ_10_01", "CFP_C_AFRCHRISTIAN_Civ_11_01", "CFP_C_AFRCHRISTIAN_Civ_12_01", "CFP_C_AFRCHRISTIAN_Civ_13_01", "CFP_C_AFRCHRISTIAN_Civ_14_01"];
_faces = ["AfricanHead_03_sick", "AfricanHead_01", "AfricanHead_02", "AfricanHead_03"];
_unitClass = selectRandom _classes;
_this setUnitLoadout _unitClass;
_uniform = selectRandomWeighted getArray (configfile >> "CfgVehicles" >> _unitClass >> "uniformList");
_headgear = selectRandomWeighted getArray (configfile >> "CfgVehicles" >> _unitClass >> "headgearList");
_facewear = getArray (configfile >> "CfgVehicles" >> _unitClass >> "facewearList");
_fw = "";
if(count _facewear > 0) then {
_fw = selectRandomWeighted _facewear;
};
_face = selectRandom _faces;
_this forceAddUniform _uniform;
_this addHeadgear _headgear;
_this linkItem _fw;
if (isServer) then {[_this, _face] remoteExec ["setFace", 0, _this]};