Created
March 5, 2017 21:04
-
-
Save pennyworth12345/fbb694e75f0477a961896f25447f834a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GetVehicleIcon = { | |
params ["_unit"]; | |
if !(isNull objectParent _unit) exitWith { | |
private _crewInfo = ((fullCrew (vehicle _unit)) select {_x select 0 isEqualTo _unit}) select 0; | |
_crewInfo params ["", "_role", "_index", "_turretPath", "_isTurret"]; | |
if (_role == "cargo") exitWith { | |
"a3\ui_f\data\igui\cfg\commandbar\imagecargo_ca.paa" | |
}; | |
if (_role == "driver") exitWith { | |
if (vehicle _unit isKindOf "Air") then { | |
//no suitable icons for this so we are using a resized one | |
"path\to\custom\imagepilot_ca.paa" | |
} else { | |
"a3\ui_f\data\igui\cfg\commandbar\imagedriver_ca.paa" | |
}; | |
}; | |
//FFV | |
if (_role == "turret" && _isTurret) exitWith { | |
"a3\ui_f\data\igui\cfg\simpletasks\types\rifle_ca.paa" | |
}; | |
//gunners and sometimes copilots | |
if (_role == "gunner" || (_role == "turret" && !_isTurret)) exitWith { | |
"a3\ui_f\data\igui\cfg\commandbar\imagegunner_ca.paa" | |
}; | |
if (_role == "commander") exitWith { | |
"a3\ui_f\data\igui\cfg\commandbar\imagecommander_ca.paa" | |
}; | |
}; | |
"" | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment