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

Function

getPlayerMapBoundingBox

Returns the world rectangle shown on the player's open map.

Syntax

float getPlayerMapBoundingBox(player thePlayer)

Arguments

thePlayerplayer
The player.Not in MTA:SA

Differences from MTA:SA

  • Arguments in a different colour differ from MTA:SA.

In MTA:SA

getPlayerMapBoundingBox()

Returns

minX, maxX, minY, maxY, or false when the map is closed.

Example

local x0, x1, y0, y1 = getPlayerMapBoundingBox(player)
if x0 then
    outputServerLog(("Mapa: %.0f..%.0f, %.0f..%.0f"):format(x0, x1, y0, y1))
end

See also