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 )

Page Links


Special Pages


Wikis

?

Render Time: 31ms

DB GetPage 5
Generate Html 4
SaveChanges (1) 8
Render Body 0
Render Sidebar 11