- Documentation
- Client functions
- setPlayerMapView
Function
setPlayerMapView
Moves the open map to a world point and sets the zoom. The map glides there smoothly. A zoom of 1 is the whole map in the window; the closest is about 10.
Syntax
bool setPlayerMapView(float x, float y, float zoom)Arguments
xfloat- World X.
yfloat- World Y.
zoomfloat- Zoom, default 1.
Returns
true when the map is open.
Example
forcePlayerMap(true)
setPlayerMapView(2495, -1687, 4) -- Grove Street z bliska
See also
getPlayerMapViewReturns 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.forcePlayerMapOpens or closes the game map: the same map as in the ESC menu, with blips, the GPS target and the route. On the server it works for one player or everyone (root). On the client you can pass a screen rectangle: the map is then drawn only inside it, without the title, legend or background around it. This works well for a spawn selection screen, because clicks outside the map still go to scripts (onClientClick, GUI). The player closes the map with ESC or the "Back" button and goes straight back to the game. Bind it to a key (e.g. F11) withbindKey.