ResetWorldSounds: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
Line 15: Line 15:
==Requirements==
==Requirements==
{{Requirements|n/a|1.3.0-9.04134|}}
{{Requirements|n/a|1.3.0-9.04134|}}
==Example==
By this command player can choose to reset world sounds to the default setting if it has been changed before using '''setWorldSoundEnabled'''
<syntaxhighlight lang="lua">
function iWantTheDefaultSounds()
    resetWorldSounds()
end
addCommandHandler('resetSounds' , iWantTheDefaultSounds )
</syntaxhighlight>


==See Also==
==See Also==
{{Client world functions}}
{{Client world functions}}

Revision as of 09:31, 28 October 2019

Accessories-text-editor.png Script Example Missing Function ResetWorldSounds needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.

This function is used to reset the world sounds to the default setting.

Syntax

bool resetWorldSounds()

Returns

Returns true if the world sounds were reset, false otherwise.

Requirements

Minimum server version n/a
Minimum client version 1.3.0-9.04134

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.3.0-9.04134" />


Example

By this command player can choose to reset world sounds to the default setting if it has been changed before using setWorldSoundEnabled

function iWantTheDefaultSounds()
    resetWorldSounds()
end
addCommandHandler('resetSounds' , iWantTheDefaultSounds )

See Also