handled arrays in extract role function

This commit is contained in:
Valmo Trindade
2024-08-27 05:30:43 -03:00
parent 1c74f9cb94
commit d20530c903

View File

@@ -21,7 +21,7 @@ switch (side _unit) do {
}; };
}; };
_unit_type = _unit call BIS_fnc_objectType; _unit_type = _unit call BIS_fnc_objectType select 1;
switch (_unit_type) do { switch (_unit_type) do {
case "AT": { case "AT": {
@@ -62,8 +62,8 @@ switch (_unit_type) do {
}; };
}; };
if (!isNull vehicle player) then { if (!isNull vehicle _unit) then {
_vehicle_type = vehicle _unit call BIS_fnc_objectType; _vehicle_type = (vehicle _unit) call BIS_fnc_objectType select 1;
switch (_vehicle_type) do { switch (_vehicle_type) do {
case "Car": { case "Car": {
@@ -78,6 +78,9 @@ if (!isNull vehicle player) then {
case "Plane": { case "Plane": {
_type = "A-M-F"; _type = "A-M-F";
}; };
case "Ship": {
_type = "S";
};
case "StaticWeapon": { case "StaticWeapon": {
_type = "G-U-C-F-M"; _type = "G-U-C-F-M";
}; };
@@ -91,7 +94,7 @@ if (!isNull vehicle player) then {
_type = "G-U-C-A-T"; _type = "G-U-C-A-T";
}; };
case "WheeledAPC": { case "WheeledAPC": {
_type = "a-f-G-U-C-R-V-A"; _type = "G-U-C-I-A";
}; };
default {}; default {};
}; };