The Colour type can be used to pre-define certain colour values for e.g. messages and vehicles. Note that most functions only use the r, g and b values of the Colour.
- Colour( int r, int g, int b )
- r - The amount of Red to be in the colour
- g - The amount of Green to be in the colour
- b - The amount of Blue to be in the colour
- a - The amount of Alpha to be in the colour
This will send a blue-coloured message saying 'Testing!' when somebody types '/blue'
- Col_Blue <- Colour( 0, 0, 255 );
- function onPlayerCommand( player, cmd, text )
- if ( cmd == "blue" )
- MessagePlayer( "Testing!", player, Col_Blue );