OnMapLoad: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 23: Line 23:
==See Also==
==See Also==
{{Map_functions}}
{{Map_functions}}
[[Category:Archived]]

Revision as of 05:48, 9 July 2024

Edit-delete.png This page is marked for deletion.

Reason: This event no longer exists.
Actions: Delete (Administrators) - Discuss - What links here - Category


This event is triggered when a map is loaded.

Syntax

void onMapLoad ( 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 ( "onMapLoad", getRootElement(), "mapLoadChatBoxOutput" )
function mapLoadChatBoxOutput ( name )
	outputChatBox ( "Map "..name.." Loaded", root, 255, 255, 255 )
end

See Also