From Multi Theft Auto: Wiki
Jump to navigation
Jump to search
|
|
| Line 1: |
Line 1: |
| This event is triggered when a resource is loaded.
| | [[onResourceStart]] |
| | |
| ==Syntax==
| |
| <syntaxhighlight lang="lua">
| |
| void onResourceLoad ( string name )
| |
| </syntaxhighlight>
| |
| | |
| ==Variables==
| |
| * The source of this event refers to the loaded resource.
| |
| *'''name''': A string representing the name of the resource
| |
| | |
| ==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}}
| |
Revision as of 11:54, 26 January 2007