Garry's Mod Wiki

Entity:GetColor

table Entity:GetColor()

Description

Returns the color the entity is set to.

The returned color will not have the color metatable.

Returns

1 table
The color of the entity as a Color.

Example

for key, ply in pairs( player.GetAll( ) ) do -- Loop through all players on the server local col = ply:GetColor( ); -- Gets the players color and assigns it to local variable col print( "Printing " .. ply:Nick() .. "'s color!" ); -- Say we are printing the players name's color PrintTable( col ); -- Pass col into PrintTable to print to contents of col end
Output: Loop through all players, and print their color.

Page Links


Special Pages


Wikis

?

Render Time: 30ms

Session 0
DB GetPage 4
Generate Html 2
SaveChanges 10
Render Body 0
Render Sidebar 12