ResetMapInfo: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(example) |
||
Line 31: | Line 31: | ||
This page does not have an example. | This page does not have an example. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
-- | addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), | ||
-- Resource load event | |||
function() | |||
resetMapInfo() | |||
end | |||
) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 17:23, 19 February 2009
This article needs checking. | |
Reason(s): This also needs to reset the following:
|
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 = getRootElement()] )
Optional Arguments
thePlayer: The specific player you wish to restore the state of. Not specifying this will result in all players map info being reset.
Returns
Returns true if the map info was reset successfully, otherwise false.
Example
This page does not have an example.
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), -- Resource load event function() resetMapInfo() end )