IsPostFXEnabled

From Multi Theft Auto: Wiki
Revision as of 11:08, 3 December 2025 by O22 (talk | contribs) (Created page with "__NOTOC__ {{Client function}} {{New feature/item|3.0161|1.6|23644 | Checks whether a specific PostFX effect is currently enabled. }} ==Syntax== <syntaxhighlight lang="lua"> bool IsPostFXEnabled ( string fxType ) </syntaxhighlight> ===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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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