resetMapInfo
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This function is used to reset the state of a player. It is intended to restore a player to his default state as if he had just joined the server, without any scripts affecting him.
Syntax
bool resetMapInfo ( [ player thePlayer = root ] )Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.
- thePlayer (default: root): The specific player you wish to restore the state of. Not specifying this will result in all players map info being reset.
Returns
- bool: value
Returns true if the map info was reset successfully, otherwise false .
Code Examples
shared
This will reset all map info when the resource is stopped.
function onResourceStop() resetMapInfo()endaddEventHandler("onResourceStop", resourceRoot, onResourceStop)