IsPostFXEnabled

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

ADDED/UPDATED IN VERSION 1.6 r23644 :

Checks whether a specific PostFX effect is currently enabled.

Syntax

bool IsPostFXEnabled ( string fxType )

Required arguments

  • fxType: An string of the PostFX. Possible values are:
    • Gamma
    • Brightness
    • Contrast
    • Saturation

Returns

Returns true if the selected type is enabled, otherwise false

Example

This example gets whether the gamma PostFX is enabled and displays it in the chat.

addCommandHandler("isGammaEnabled", 
    function()
        local isEnabled = isPostFXEnabled("Gamma")
        outputChatBox("Your gamma mode is: "..(isEnabled and "Enabled" or "Disabled"))
    end, false, false
)

See Also