addResourceMap | Multi Theft Auto: Wiki Skip to content

addResourceMap

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function adds a new empty mapfile to an existing resource.

Note

You can't add a map to a running resource.

Syntax

xmlnode addResourceMap ( string filePath, [ int dimension = 0 ] )
Required Arguments
  • filePath: The filepath of the resource map in the following format: ":resourceName/path" . 'resourceName' is the name of the resource the map file will be in, and 'path' is the path from the root directory of the resource to the file.
Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.

  • dimension (default: 0): the dimension in which the map's objects will be placed.

Returns

  • xmlnode: value

Returns the new map's root xmlnode if the map was added successfully, false otherwise.

Code Examples

shared

This example just adds a map to a gamemode resource called "cdm".

addResourceMap(":cdm/[maps]/New.map",0)