<aside> ⚡ script "core_getteampalette" (int team, int col) CLIENTSIDE

</aside>

Usage


This script can be used to get one of the palette numbers for a given team’s team colors.

Parameters

Return Value

Returns the palette mapped color’s palette number.

<aside> 🚨 Because team colors differ between clients and only exist on CLIENTSIDE, this script’s return value is only meaningful when called in a CLIENTSIDE context!

</aside>

Example


This DrawBar script creates an ammo bar which matches the player’s current team.

#include "8BDMDEFS.acs"

script "DrawBar_Springfield" (void) CLIENTSIDE {
	int team = GetPlayerInfo(PlayerNumber(), PLAYERINFO_TEAM);
	if(team >= 0 && team <= 3) {
		DrawBarColor(
			ACS_NamedExecuteWithResult("core_getteampalette", team, COLOR_SECONDARY), 
			ACS_NamedExecuteWithResult("core_getteampalette", team, COLOR_PRIMARY)
		);
	} else {
		DrawBarColor(192, 198);
	}
}

See Also


Team Colors