From d20530c903bb31f7ba6727eba5bdea8c6c533f2c Mon Sep 17 00:00:00 2001 From: Valmo Trindade Date: Tue, 27 Aug 2024 05:30:43 -0300 Subject: [PATCH] handled arrays in extract role function --- .../main/functions/extract_data/fn_extract_role.sqf | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/addons/main/functions/extract_data/fn_extract_role.sqf b/addons/main/functions/extract_data/fn_extract_role.sqf index 7445da0..a777bef 100644 --- a/addons/main/functions/extract_data/fn_extract_role.sqf +++ b/addons/main/functions/extract_data/fn_extract_role.sqf @@ -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 { case "AT": { @@ -62,8 +62,8 @@ switch (_unit_type) do { }; }; -if (!isNull vehicle player) then { - _vehicle_type = vehicle _unit call BIS_fnc_objectType; +if (!isNull vehicle _unit) then { + _vehicle_type = (vehicle _unit) call BIS_fnc_objectType select 1; switch (_vehicle_type) do { case "Car": { @@ -78,6 +78,9 @@ if (!isNull vehicle player) then { case "Plane": { _type = "A-M-F"; }; + case "Ship": { + _type = "S"; + }; case "StaticWeapon": { _type = "G-U-C-F-M"; }; @@ -91,7 +94,7 @@ if (!isNull vehicle player) then { _type = "G-U-C-A-T"; }; case "WheeledAPC": { - _type = "a-f-G-U-C-R-V-A"; + _type = "G-U-C-I-A"; }; default {}; };