OnResourceLoad: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
This event is triggered when a map is loaded.
#REDIRECT [[OnResourceStart]]
 
==Syntax==
<syntaxhighlight lang="lua">
void onResourceLoad ( string name )
</syntaxhighlight>
 
==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
<syntaxhighlight lang="lua">
addEventHandler ( "onResourceLoad", getRootElement(), "mapLoadChatBoxOutput" )
function mapLoadChatBoxOutput ( name )
outputChatBox ( "Map "..name.." Loaded", root, 255, 255, 255 )
end
</syntaxhighlight>
 
==See Also==
{{Event_functions}}

Latest revision as of 17:25, 26 January 2007

Redirect to: