ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. setColorFilter

Function

setColorFilter

Server and clientWorldIdentical to MTA:SA

Applies 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.

Syntax

bool setColorFilter(int r1, int g1, int b1, int a1, int r2, int g2, int b2, int a2)

Arguments

r1int
First layer red.
g1int
First layer green.
b1int
First layer blue.
a1int
First layer alpha.
r2int
Second layer red.
g2int
Second layer green.
b2int
Second layer blue.
a2int
Second layer alpha.

Returns

true on success.

Example

setColorFilter(112, 66, 20, 60, 0, 0, 0, 0)

See also