OnResourceLoad

From Multi Theft Auto: Wiki
Revision as of 20:34, 25 January 2007 by BrophY (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This event is triggered when a map is loaded.

Syntax

void onResourceLoad ( string name )

Variables

  • The source of this event refers to the loaded map.
  • name: A string representing the name of the map

Example

This example displays a message in the textbox when you load a map containing this lua

addEventHandler ( "onResourceLoad", getRootElement(), "mapLoadChatBoxOutput" )
function mapLoadChatBoxOutput ( name )
	outputChatBox ( "Map "..name.." Loaded", root, 255, 255, 255 )
end

See Also