ResetBlurLevel: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Client function}}
{{Client function}}
__NOTOC__
__NOTOC__
Resets the motion blur level on the clients screen to default value (36).
Resets the motion blur level on the client's screen to default value (36).


==Syntax==
==Syntax==
<section name="Client" class="client" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool resetBlurLevel ( )
bool resetBlurLevel ( )
</syntaxhighlight>
</syntaxhighlight>
</section>


==Returns==
==Returns==
Line 14: Line 12:


==Example==
==Example==
<section name="Client" class="client" show="true">
This example allows the player to reset their blur level with a command:
This example allows the player to reset their blur level via a command
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">  
function resetBlurCommand ()
function resetBlurCommand()
    if resetBlurLevel () then
if resetBlurLevel() then
        outputChatBox ("Reset blur level.", 0, 255, 0)
outputChatBox("Reset blur level.", 0, 255, 0)
    else
else
        outputChatBox ("Failed to reset blur level.", 255, 0, 0)
outputChatBox("Failed to reset blur level.", 255, 0, 0)
    end
end
end
end
addCommandHandler("resetblur", resetBlurCommand)
 
addCommandHandler ("resetblur", resetBlurCommand)
</syntaxhighlight>
</syntaxhighlight>
</section>
 
==Requirements==
==Requirements==
{{Requirements|n/a|1.5.7-9.20450|}}
{{Requirements|n/a|1.5.7-9.20450|}}
==See Also==
==See Also==
{{Player functions}}
{{Player functions}}

Revision as of 18:07, 20 September 2021

Resets the motion blur level on the client's screen to default value (36).

Syntax

bool resetBlurLevel ( )

Returns

Returns true if the blur level was reset successfully, false otherwise.

Example

This example allows the player to reset their blur level with a command:

function resetBlurCommand ()
    if resetBlurLevel () then
        outputChatBox ("Reset blur level.", 0, 255, 0)
    else
        outputChatBox ("Failed to reset blur level.", 255, 0, 0)
    end
end

addCommandHandler ("resetblur", resetBlurCommand)

Requirements

This template will be deleted.

See Also