Files
armatak/addons/main/functions/extract_data/fn_extract_role.sqf

50 lines
1.4 KiB
Plaintext

params["_unit"];
private _affiliation = "f";
private _type = "G";
switch (side _unit) do {
case "WEST": { _affiliation = "f"; };
case "EAST": { _affiliation = "h"; };
case "INDEPENDENT": { _affiliation = "n"; };
case "CIVILIAN": { _affiliation = "u"; };
default { _affiliation = "f"; };
};
_unit_type = _unit call BIS_fnc_objectType;
switch (_unit_type) do {
case "AT": { _type = "G-U-C-F-R"; };
case "Civilian": { _type = "G-E-V-C"; };
case "Diver": { _type = "U-S"; };
case "Infantry": { _type = "G-U-C-I"; };
case "Medic": { _type = "a-f-G-U-C"; };
case "MG": { _type = "G-U-C-I"; };
case "Officer": { _type = "G-U-C-I"; };
case "Pilot": {_type = "G-U-C-V"; };
case "Sniper": { _type = "G-U-C-R-X"; };
case "SpecialForces": { _type = ""; };
case "UAVPilot": { _type = "G-U-C-V-U"; };
default { _type = "G-U-C-I"; };
};
if (vehicle _unit) then {
_vehicle_type = vehicle _unit call BIS_fnc_objectType;
switch (_vehicle_type) do {
case "Car": { _type = "G-U-C-I-M"; };
case "Helicopter": { _type = "A-M-H"; };
case "Motorcycle": { _type = "G-U-C-I-M"; };
case "Plane": { _type = "A-M-F"; };
case "StaticWeapon": { _type = "G-U-C-F-M"; };
case "Submarine": { _type = "U-S"; };
case "TrackedAPC": { _type = "G-U-C-I-I"; };
case "Tank": { _type = "G-U-C-A-T"; };
case "WheeledAPC": { _type = "a-f-G-U-C-R-V-A"; };
default { _type = "G-U-C-I-M"; };
};
};
_role = "a-" + _affiliation + "-" + _type;
_role