SetColorFilter: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Client function}} {{New feature/item|3.0160|1.5.8|20718|This function is used to override the default color filtering values.}} {{Tip|Normally the game is adding...")
 
mNo edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Client function}}
{{Client function}}
{{New feature/item|3.0160|1.5.8|20718|This function is used to override the default color filtering values.}}
{{New feature/item|3.0159|1.5.8|20718|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.}}  
{{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.}}  



Revision as of 11:32, 11 April 2021

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

[[{{{image}}}|link=|]] 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

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

Example

This example lets any player disable the default color filtering

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

See Also