ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. getPlayerMapView

Function

getPlayerMapView

ClientPlayersTrilogy Hub only

Returns the centre of the open map in the world and the zoom. A zoom of 1 means the whole map fits the window; higher values are closer.

Syntax

float getPlayerMapView()

Returns

x, y, zoom, or false when the map is closed.

Example

local x, y, zoom = getPlayerMapView()
if x then outputChatBox(("Mapa: %.0f, %.0f x%.1f"):format(x, y, zoom)) end

See also