SetTeamColor

From Multi Theft Auto: Wiki
Revision as of 21:21, 15 August 2007 by Arc (talk | contribs)
Jump to navigation Jump to search

This function is for setting the color of a specified team.

Syntax

bool setTeamColor ( team theTeam, int colorR, int colorG, int colorB )

Required Arguments

  • theTeam: The team you want to change the color of.
  • colorR: An integer representing the Red color value.
  • colorG: An integer representing the Green color value.
  • colorB: An integer representing the Blue color value.

Returns

Returns 'true' if the team is valid and the color is different, otherwise 'false'.

Example

This example creates a new team then changes its name and color.

team = createTeam ( "RedTeam", 255, 0, 0 ) -- create the team
if ( team ) then                           -- if the team was created
    setTeamName ( team, "BlueTeam" )       -- change the name
    setTeamColor ( team, 0, 0, 255 )       -- change the color to suit its new name
end

See Also

Shared