- Documentation
- Shared functions
- getColorFilter
Function
getColorFilter
Returns the colour filter set with setColorFilter. On the client it returns the local filter, or the server filter without it.
Syntax
int... getColorFilter()Differences from MTA:SA
- These MTA:SA arguments are not here:
bool isOriginal
In MTA:SA
getColorFilter(bool isOriginal)Returns
Eight components (r1, g1, b1, a1, r2, g2, b2, a2), or false when there is no filter.
Example
local r, g, b, a = getColorFilter()
if r then outputDebugString(("Filtr %d %d %d %d"):format(r, g, b, a)) end
See also
setColorFilterApplies a colour filter to the game image: two RGBA layers multiply the colours of the world, each to the degree of its alpha (alpha 0 = the layer changes nothing, 255 = the full layer colour). On the server every player gets the filter, on the client only this player (it takes priority over the server filter). Script texts and windows are not tinted.resetColorFilterRemoves the colour filter. On the server for all players; on the client it removes the local filter, and the server filter (if any) stays.