setColorFilter | Multi Theft Auto: Wiki Skip to content

setColorFilter

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function is used to override the default color filtering values.

Tip

Normally the game is adding these colors to a screen to simulate weather effects. Sometimes it can be important to disable these effects. You can get rid of the effects by calling this function with zero values.

Syntax

bool setColorFilter ( int aRed, int aGreen, int aBlue, int aAlpha, int bRed, int bGreen, int bBlue, int bAlpha )
Required Arguments
  • aRed: The amount of red (0-255).
  • aGreen: The amount of green (0-255).
  • aBlue: The amount of blue (0-255).
  • aAlpha: The amount of alpha (0-255).
  • bRed: The amount of red (0-255).
  • bGreen: The amount of green (0-255).
  • bBlue: The amount of blue (0-255).
  • bAlpha: The amount of alpha (0-255).

Returns

  • bool: value

Returns true if the color filter was set, false otherwise.

Code Examples

shared

This example lets any player disable the default color filtering:

function disableFilter ()
setColorFilter (0, 0, 0, 0, 0, 0, 0, 0)
end
addCommandHandler ("disablecolorfilter", disableFilter) -- Add the command

See Also

World Functions