Garry's Mod Wiki

Garry's Mod Wiki

  Color Entity:GetColor()

Description

Returns the color the entity is set to.

Returns

1 Color
The color of the entity as a Color.

Example

for key, ply in ipairs( 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.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...