engineParseSAMPMap
Client-side
Parses Texture Studio / SA-MP Pawn map source into inert objects, building removals, material overrides, and diagnostics.
Syntax
table engineParseSAMPMap(string source)Arguments
sourcestringComplete Pawn map source text.
Returns
A result table with success, counts, objects, removedBuildings and diagnostics.
Ownership and lifecycle
Parsing creates inert data. Objects, custom models, material overrides, removals, and any temporary streaming-limit split remain owned by the calling client resource and must be cleaned up when that resource stops.
Important behavior
- Parsing does not create elements or load models.
- Object records preserve virtual world, interior, stream/draw distance and source location metadata.
Example
local parsed = engineParseSAMPMap(mapSource)if not parsed.success then outputDebugString(parsed.diagnostics[1].message, 1)endWhere this comes from
SOURCECLuaEngineDefs.cppClient/mods/deathmatch/logic/luadefs/CLuaEngineDefs.cpp INTRODUCED / EXTENDED28dfcff23Read the commit and why the change was made TEST RESOURCE samp-map-loader test-resources/samp-map-loader
RELATED NEON APIS
Read the system guide → Continue exploring
← Back to the Neon Lua API · How SA-MP maps and object streaming works →