GetMapMarkers
The map’s markers of a tag.
Syntax
Section titled “Syntax”GetMapMarkers([tag])| Parameter | Type | |
|---|---|---|
tag |
string | the tag (nil or "" = every marker) (optional) |
Returns
Section titled “Returns”table - a list of GetMapObject’s tables, by id (params is the tag, yaw the way it faces)
Example
Section titled “Example”-- a newcomer spawns at one of the markers the admins placedfunction OnPlayerSpawn(pid) local spots = GetMapMarkers("spawn") if #spots > 0 then local s = spots[math.random(#spots)] SetPlayerPos(pid, s.x, s.y, s.z) endendSee also
Section titled “See also”CreateMapMarker · GetMapObject · the The server’s map group of the index
