Moving, resizing and squaring the FiveM minimap
The minimap is made of scaleform components (minimap, minimap_mask, minimap_blur) that can be moved and resized with SetMinimapComponentPosition(name, alignX, alignY, posX, posY, sizeX, sizeY) followed by a reload of the minimap. To place HUD elements beside it, compute its rectangle from the safe-zone size and aspect ratio — the widely used “GetMinimapAnchor” function does exactly that.
SetMinimapComponentPosition is the native that moves and resizes the FiveM minimap, and it is also how servers square it off. The other half of the job is reading where the minimap already sits: a custom HUD almost always wants health bars, a speedometer or street names right beside it, which only works if you know its exact rectangle on every screen. Both are fiddly, and both depend on the player's resolution and safe-zone setting.

#What the minimap is made of
| Component | Role |
|---|---|
minimap | The map itself |
minimap_mask | The shape that clips the map (rounded rectangle by default) |
minimap_blur | The soft background behind it |
Each component has an alignment (left/right/top/bottom), a position and a size in screen-relative units (0–1). Change them together or the map, mask and blur drift apart.
#Moving and resizing
CreateThread(function()
-- alignX 'L' = left, alignY 'B' = bottom; then posX, posY, sizeX, sizeY
SetMinimapComponentPosition('minimap', 'L', 'B', -0.0045, -0.022, 0.160, 0.190)
SetMinimapComponentPosition('minimap_mask', 'L', 'B', 0.020, 0.032, 0.111, 0.159)
SetMinimapComponentPosition('minimap_blur', 'L', 'B', -0.03, 0.002, 0.266, 0.237)
-- Re-initialise so the new layout is used
SetBigmapActive(true, false)
Wait(0)
SetBigmapActive(false, false)
end)The exact numbers depend on the look you want; the values above are a starting point, not a standard. Change one component at a time, reload, and compare in game at 16:9 and at your ultrawide or 16:10 test resolution.
#Square minimaps
Resizing alone does not make the minimap square — the mask is a texture with rounded corners. Square-minimap resources stream a replacement mask texture (a square instead of the rounded shape) and then set the component sizes so the map fills it. If you only change sizes, you get a stretched rounded rectangle.
A square minimap pairs well with a clean custom texture, because the extra corners show more map. Our maps work with round and square layouts alike; installing a custom minimap covers load order when a HUD also touches the minimap.
#Finding the minimap’s exact rectangle for a HUD
Most HUD resources contain a version of a function commonly called GetMinimapAnchor. It computes the minimap’s rectangle from the safe-zone size and the screen’s aspect ratio, so HUD elements can be drawn in the same place on every resolution. The idea:
function GetMinimapAnchor()
local safezone = GetSafeZoneSize()
local sx, sy = 1.0 / 20.0, 1.0 / 20.0
local aspect = GetAspectRatio(false)
local resX, resY = GetActiveScreenResolution()
local xscale = 1.0 / resX
local yscale = 1.0 / resY
local mm = {}
mm.width = xscale * (resX / (4 * aspect))
mm.height = yscale * (resY / 5.674)
mm.left_x = xscale * (resX * (sx * (math.abs(safezone - 1.0) * 10)))
mm.bottom_y = 1.0 - yscale * (resY * (sy * (math.abs(safezone - 1.0) * 10)))
mm.right_x = mm.left_x + mm.width
mm.top_y = mm.bottom_y - mm.height
return mm -- all values in 0-1 screen space
endThe result is in 0–1 screen space: multiply by the resolution for pixels, or use it directly with the game’s draw natives. For an NUI HUD, send the values to the page and position elements with percentages. Recalculate when the resolution or safe-zone setting changes, and note that the result describes the default layout — if you move the minimap, offset the anchor by the same amounts.
#The safe-zone setting
Players can shrink the HUD area in the game’s display settings (“Safe Zone Size”), which pulls the minimap inwards from the screen edges. That is why a HUD built with fixed pixel offsets lines up on your PC and floats in space on someone else’s. Always read GetSafeZoneSize().
Questions
How do I move the minimap in FiveM?
SetMinimapComponentPosition for the minimap, minimap_mask and minimap_blur components, then toggle the big map on and off so the minimap rebuilds with the new layout.How do I make a square minimap?
Why does my HUD not line up with the minimap on other screens?
Does moving the minimap affect custom minimap textures?
Ready to pick a map?
Twelve themes on three base map styles, $8 each, instant download.
Relevant to what you just read
Look it up while you work
The reference tables this guide leans on, free and without an account.
- Every GTA 5 zone nameAll 291 popzones across 44 districts, with the ids GET_NAME_OF_ZONE and GET_ZONE_FROM_NAME_ID use.