ResetColorFilter: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Client function}}
{{Client function}}
{{New feature/item|3.0159|1.5.8|20718|This function is used to reset the color filtering to its default values.}}
This function is used to reset the color filtering to its default values.


==Syntax==  
==Syntax==  
Line 9: Line 9:


===Returns===
===Returns===
Returns true if the color filtering was reset, false otherwise.
Returns ''true'' if the color filtering was reset, ''false'' otherwise.


==Example==
==Example==
This example lets any player reset the color filtering
This example lets any player reset the color filtering:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function resetFilter()
function resetFilter ()
   resetColorFilter()
   resetColorFilter ()
end
end
addCommandHandler("reset_filter", resetFilter) -- Add the command
 
addCommandHandler ("resetcolorfilter", resetFilter) -- Add the command
</syntaxhighlight>
</syntaxhighlight>
==Requirements==
{{Requirements|n/a|1.5.8-9.20718|}}


==See Also==
==See Also==
{{World functions}}
{{World functions}}

Revision as of 15:19, 19 September 2021

This function is used to reset the color filtering to its default values.

Syntax

bool resetColorFilter ()

Returns

Returns true if the color filtering was reset, false otherwise.

Example

This example lets any player reset the color filtering:

function resetFilter ()
   resetColorFilter ()
end

addCommandHandler ("resetcolorfilter", resetFilter) -- Add the command

Requirements

Minimum server version n/a
Minimum client version 1.5.8-9.20718

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.5.8-9.20718" />

See Also