From Multi Theft Auto: Wiki
Revision as of 12:02, 25 February 2013 by X86dev (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.


bool resetMapInfo ( [player thePlayer = getRootElement()] )

Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see 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 true if the map info was reset successfully, otherwise false.


This will reset all map info when the resource is stopped.

addEventHandler("onResourceStop", getResourceRootElement(getThisResource()),
	-- Resource stop event

See Also