- Documentation
- Server functions
- addResourceMap
Function
addResourceMap
Adds a map file (<map src dimension>) to the meta.xml of a resource – your own, or one this script created with createResource. The map loads the next time the resource starts.
Syntax
bool addResourceMap(resource theResource, string filePath [, int dimension = 0])Arguments
theResourceresource- The resource.Different type in MTA:SA: string filePath
filePathstring- The
.mapfile path.Different type in MTA:SA: int dimension = 0 dimensionint, optional = 0- The dimension the map appears in.Not in MTA:SA
Differences from MTA:SA
- Arguments in a different colour differ from MTA:SA.
In MTA:SA
addResourceMap(string filePath, int dimension = 0)Returns
true on success.
Example
addResourceMap(getThisResource(), "nowa.map", 0)
See also
addResourceConfigAdds a config file (<config src type>) to themeta.xmlof a resource – your own, or one this script created withcreateResource. Adding the same file twice changes nothing.getResourceMapRootElementReturns the element of a map loaded from the resource's.mapfile; its children are the objects, vehicles and other elements from that map.