Garry's Mod Wiki

team.GetColor

  table team.GetColor( number teamIndex )

Description

Returns the team's color.

Arguments

1 number teamIndex
The team index.

Returns

1 table
The team's color as a Color.

Example

( Clientside Example ) Draws a box with the LocalPlayer team's color in the top left corner of the screen.

hook.Add( "HUDPaint", "WikiTeamGetColorExample", function() surface.SetDrawColor( team.GetColor( LocalPlayer():Team() ) ) surface.DrawRect( 0, 0, 150, 150 ) end )