ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. saveMapData

Function

saveMapData

ServerMapsIdentical to MTA:SA

Saves the elements under a given element to an XML node in .map format.

Syntax

bool saveMapData(xmlnode node, element baseElement [, bool childrenOnly = false])

Arguments

nodexmlnode
The XML node.
baseElementelement
The element whose children to save.
childrenOnlybool, optional = false
Children only, without the element itself.

Returns

true on success.

Example

local xml = xmlCreateFile("maps/zapis.map", "map")
saveMapData(xml, resourceRoot, true)
xmlSaveFile(xml)
xmlUnloadFile(xml)