Jump to content
Sign in to follow this  
Grumpy Old Man

[How to] - Rank Insignia for all units

Recommended Posts

Hey folks,

quickly threw together this little gem:

AiLq9PE.jpg

makes all existing rank icons available for use with the new UnitInsignia function.

description.ext:

class CfgUnitInsignia
{
class Private
{
	displayName = "Private"; // Name displayed in Arsenal
	author = "Bohemia Interactive"; // Author displayed in Arsenal
	texture = "\A3\Ui_f\data\GUI\Cfg\Ranks\private_gs.paa"; // Image path
	textureVehicle = ""; // Does nothing currently, reserved for future use
};

	class Corporal
{
	displayName = "Corporal"; // Name displayed in Arsenal
	author = "Bohemia Interactive"; // Author displayed in Arsenal
	texture = "\A3\Ui_f\data\GUI\Cfg\Ranks\corporal_gs.paa"; // Image path
	textureVehicle = ""; // Does nothing currently, reserved for future use
};

	class Sergeant
{
	displayName = "Sergeant"; // Name displayed in Arsenal
	author = "Bohemia Interactive"; // Author displayed in Arsenal
	texture = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa"; // Image path
	textureVehicle = ""; // Does nothing currently, reserved for future use
};

	class Lieutenant
{
	displayName = "Lieutenant"; // Name displayed in Arsenal
	author = "Bohemia Interactive"; // Author displayed in Arsenal
	texture = "\A3\Ui_f\data\GUI\Cfg\Ranks\lieutenant_gs.paa"; // Image path
	textureVehicle = ""; // Does nothing currently, reserved for future use
};

	class Captain
{
	displayName = "Captain"; // Name displayed in Arsenal
	author = "Bohemia Interactive"; // Author displayed in Arsenal
	texture = "\A3\Ui_f\data\GUI\Cfg\Ranks\captain_gs.paa"; // Image path
	textureVehicle = ""; // Does nothing currently, reserved for future use
};

		class Major
{
	displayName = "Major"; // Name displayed in Arsenal
	author = "Bohemia Interactive"; // Author displayed in Arsenal
	texture = "\A3\Ui_f\data\GUI\Cfg\Ranks\major_gs.paa"; // Image path
	textureVehicle = ""; // Does nothing currently, reserved for future use
};

	class Colonel
{
	displayName = "Colonel"; // Name displayed in Arsenal
	author = "Bohemia Interactive"; // Author displayed in Arsenal
	texture = "\A3\Ui_f\data\GUI\Cfg\Ranks\colonel_gs.paa"; // Image path
	textureVehicle = ""; // Does nothing currently, reserved for future use
};

	class General
{
	displayName = "General"; // Name displayed in Arsenal
	author = "Bohemia Interactive"; // Author displayed in Arsenal
	texture = "\A3\Ui_f\data\GUI\Cfg\Ranks\general_gs.paa"; // Image path
	textureVehicle = ""; // Does nothing currently, reserved for future use
};


};

from wherever you want you can call

{[_x,rank _x] call BIS_fnc_setUnitInsignia} foreach allunits;

to set the insignia according to the units rank.

Enjoy!

Share this post


Link to post
Share on other sites

Script on serverside:

private ["_RANKICON"];


{
_RANKICON = [_x,"texture"] call BIS_fnc_rankParams;
if (_x isKindOf "B_Soldier_base_F" || _x isKindOf "I_Soldier_base_F") then
 		        {
			_x setObjectTextureGlobal [1, _RANKICON];
		}
		else
		{
			_x setObjectTextureGlobal [2, _RANKICON];
		};

} forEAch allunits

CSAT units has more hiddenselections then USA / AAF

Edited by Drunken Officer

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×