minimaphudnatives13 min read · updated 9/11/2026

Moving and resizing the FiveM minimap

A custom HUD almost always wants to place health bars, speedometers or street names right next to the minimap — which only works if you know exactly where the minimap is on every screen. And some servers want to move or reshape the minimap itself, most commonly into a square. Both are possible, both are fiddly, and both depend on the player’s resolution and safe-zone setting.

Short answer: 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.

FiveM Minimap Position: Move & Resize the Minimap (HUD Anchor)

#What the minimap is made of

ComponentRole
minimapThe map itself
minimap_maskThe shape that clips the map (rounded rectangle by default)
minimap_blurThe 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

client.lua — a slightly larger minimap
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:

client.lua — the classic minimap anchor calculation
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
end

The 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?
Use 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?
Stream a square mask texture to replace the rounded one and resize the components to match. Resizing alone leaves rounded corners.
Why does my HUD not line up with the minimap on other screens?
It uses fixed pixel offsets. Compute the minimap position from the safe-zone size and aspect ratio (a GetMinimapAnchor function) and place elements relative to it.
Does moving the minimap affect custom minimap textures?
No. The texture is what is drawn; the component position is where it is drawn. Any texture works with any layout.

Ready to pick a map?

Twelve themes on three base map styles, $8 each, instant download.