Grand opening25% off everything with FAM-261023-261025-UL4B9this weekendTick it in your cart Halloween Edition36 maps, limited runlimited runShop the drop

FREE TOOL · NUI OVERLAY

FiveM crosshair generator

Design a crosshair — a cross, a T, a dot or a ring — set the gap, the thickness, the colour and the outline, and watch it over four backgrounds that are deliberately awkward. Then take it away as a PNG, as an SVG, or as a finished FiveM resource you can drop into resources/ and ensure.

Read this part first: FiveM has no custom crosshair setting. The game draws its own reticle and nothing in the client replaces it. What this builds is an overlay — a transparent NUI page sitting on top of the frame — which is how every FiveM crosshair works, and which has consequences the section below spells out rather than hides.

1:1 — actual size on screen
6× — 42 × 42 px export box
Check it on all four. A crosshair only has to fail once.

Shape

Geometry

Colour

A one-pixel black outline is the single change that makes a crosshair readable on every background. It is why almost every shipped crosshair has one.

Start from a preset

Folder, name in the manifest and ensure my_crosshair in server.cfg.
PNG scale

The zip is built in this tab — nothing is uploaded and no account is involved. It contains four files: fxmanifest.lua, index.html, client.lua and a README.txt that repeats the install steps and the warnings on this page.

my_crosshair/fxmanifest.lua
fx_version 'cerulean'
game 'gta5'

name 'my_crosshair'
author 'PiTyUs C'
description 'A static crosshair drawn as an always-on NUI overlay.'
version '1.0.0'

ui_page 'index.html'

files {
    'index.html'
}

client_script 'client.lua'
my_crosshair/index.html

The whole crosshair is in this one file. Note what is missing: no SetNuiFocus, no background colour on body, and pointer-events: none — a NUI page is the full screen, so a background here would hide the game.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>crosshair</title>
  <style>
      html, body {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        background: transparent;
        pointer-events: none;
        user-select: none;
      }

      #xh {
        position: fixed;
        left: 50%;
        top: 50%;
        width: 0;
        height: 0;
        opacity: 0.92;
      }

      #xh i {
        position: absolute;
        left: 0;
        top: 0;
        display: block;
        box-sizing: content-box;
      }

      #xh .p0 { width: 2px; height: 10px; margin-left: -1px; margin-top: -16px; background: #00ff88; outline: 1px solid #000000; }
      #xh .p1 { width: 2px; height: 10px; margin-left: -1px; margin-top: 6px; background: #00ff88; outline: 1px solid #000000; }
      #xh .p2 { width: 10px; height: 2px; margin-left: -16px; margin-top: -1px; background: #00ff88; outline: 1px solid #000000; }
      #xh .p3 { width: 10px; height: 2px; margin-left: 6px; margin-top: -1px; background: #00ff88; outline: 1px solid #000000; }
  </style>
</head>
<body>
  <div id="xh">
      <i class="p0"></i>
      <i class="p1"></i>
      <i class="p2"></i>
      <i class="p3"></i>
  </div>
  <script>
    window.addEventListener('message', function (event) {
      var data = event.data || {};
      if (data.action !== 'crosshair:visible') return;
      document.getElementById('xh').style.display = data.state ? 'block' : 'none';
    });
  </script>
</body>
</html>
my_crosshair/client.lua

Optional. Delete this file and the client_script line and the crosshair is simply always on. The flags at the top are the only configuration.

local HIDE_IN_PAUSE_MENU = true
local HIDE_WHEN_FADED = true
local ONLY_WHILE_AIMING = false
local HIDE_GAME_RETICLE = false

local shown = true

local function setShown(state)
    if state == shown then return end
    shown = state
    SendNUIMessage({ action = 'crosshair:visible', state = state })
end

CreateThread(function()
    while true do
        Wait(200)

        local want = true

        if HIDE_IN_PAUSE_MENU and IsPauseMenuActive() then
            want = false
        end

        if HIDE_WHEN_FADED and (IsScreenFadedOut() or IsScreenFadingOut()) then
            want = false
        end

        if ONLY_WHILE_AIMING and not IsPlayerFreeAiming(PlayerId()) then
            want = false
        end

        setShown(want)
    end
end)

if HIDE_GAME_RETICLE then
    CreateThread(function()
        while true do
            Wait(0)
            HideHudComponentThisFrame(14)
        end
    end)
end

HOW TO USE IT

Four files, one line in server.cfg

Download the zip, unpack the folder into your server’s resources directory, and add one line to server.cfg. There is no config file, no dependency and no build step: the crosshair itself is pixel values inside the <style> block of index.html, so you can keep tuning it by editing that file and restarting the resource.

server.cfg

Server-side.

## server.cfg — the whole install, once the folder is in resources/
ensure my_crosshair

## If you keep your own resources in a subfolder, FiveM needs to know about it:
# add_ace resource.my_crosshair command allow   # not needed: the overlay runs no commands
#
## Already running? Two lines in the live console do it without a restart:
#   refresh
#   ensure my_crosshair
Optional: hide GTA's own reticle underneath

Client-side. The download has the first of these behind a HIDE_GAME_RETICLE flag, switched off, because the game reticle still tells you something useful about spread.

-- Optional, client-side: remove the game's own reticle and keep only the overlay.
-- Component 14 is RETICLE in the FiveM HUD component list. The native is a
-- "ThisFrame" one, so it has to be called every frame or the reticle flickers back.
CreateThread(function()
    while true do
        Wait(0)
        HideHudComponentThisFrame(14)
    end
end)

-- The same pattern, but only while the player is actually aiming down the weapon:
CreateThread(function()
    while true do
        Wait(0)
        if IsPlayerFreeAiming(PlayerId()) then
            HideHudComponentThisFrame(14)
        end
    end
end)
Why a NUI page and not DrawRect

You can draw a crosshair with DrawRect in a per-frame thread, and some resources do. It costs you a Lua thread at Wait(0) forever, the coordinates are normalised 0–1 rather than pixels so it stretches with aspect ratio, and you cannot have an outline without drawing every rectangle twice. The NUI page is drawn by the browser layer instead and costs no Lua at all once it is up.

The outline is not decoration

A pure white crosshair vanishes on daylight concrete and a green one vanishes on grass. One black pixel around every arm fixes both, which is why nearly every shipped crosshair in every game has an outline. Switch between the four preview backgrounds before you decide you do not need it.

Third person is not the screen centre

In first person the aim point and the middle of the screen are the same place. In third person the camera sits over the shoulder, so the game’s own reticle is not at the geometric centre — a fixed centre overlay is a rough reference there, not a point of impact. Worth knowing before you hide the real reticle.

It never takes your mouse

A NUI page only receives input once something calls SetNuiFocus(true, true). This resource never calls it — not once, anywhere — so the overlay cannot steal the cursor or swallow a keypress. That is the whole reason it can be always-on.

BE HONEST ABOUT IT

What an overlay crosshair is, and what it is not

There is no technical trick here and we are not going to dress it up as one. The resource adds a transparent page with a few coloured boxes on it, drawn above everything the game renders. It does not read memory, does not call an aiming native, does not modify a weapon, and does not change where a bullet goes. It is a sticker on the inside of the monitor, shipped by the server.

It comes from the server, not the player

Resources are sent to the client by the server. You cannot add this to your own install and carry it onto someone else’s city — which also means that when a server does install it, every player gets the same crosshair. That is the fair version, and it is the only version FiveM actually supports.

Servers are entitled to say no

A permanent centre reference is an advantage the base game does not give you while hip-firing. Competitive and serious-roleplay servers often have a rule about overlays, and an anti-cheat may flag an unfamiliar resource on principle. Ask the owner first; that is a policy conversation, not a technical one.

It draws over the pause menu too

An always-on NUI page sits above the pause menu, the map and any cutscene. The optional client.lua hides it during the pause menu and during screen fades for exactly this reason, with SendNUIMessage rather than focus.

What we have not verified

Whether a given server’s anti-cheat tolerates it — we cannot test every anti-cheat, and we are not going to claim otherwise. Nor whether an overlay drawn this way is captured by any particular screenshot tool. The rest of the behaviour above is how NUI and the HUD natives are documented to work.

QUESTIONS

About FiveM crosshairs and NUI overlays

Does FiveM have a custom crosshair setting?
No. There is no setting in the FiveM client, no convar and no keybind that replaces the game’s reticle with one of your own. GTA V draws its reticle itself, the shape is decided by the weapon you are holding, and the only control you get over it is the game’s own aim settings and whether the HUD component is drawn at all. Everything sold or shared as a "FiveM custom crosshair" is the same thing this tool builds: a second layer drawn on top of the frame, either a NUI page or a Lua script calling the drawing natives every frame.
Can I install this on my own client to use on any server?
No, and that is worth being clear about. FiveM resources are sent to the client by the server you join — you cannot drop a folder into your own FiveM install and have it run in somebody else’s city. The zip this page produces is a server resource: it works if you own the server, or if the owner adds it. If you want a crosshair on a server that does not have one, the honest options are asking the owner, or an overlay outside the game entirely, which is a different thing with different rules and is not what this builds.
Is an overlay crosshair an anti-cheat problem?
Technically it is about as harmless as a resource gets: a transparent web page with four coloured rectangles in it. It reads no memory, calls no aiming natives, injects nothing and never takes input — the resource in this zip contains no SetNuiFocus call at all. The question is not technical but a policy one. A permanent centre reference is an advantage the base game does not hand you when hip-firing, so competitive and serious-roleplay servers often have a rule about third-party overlays, and some anti-cheats flag unexpected resources on principle. Because it ships from the server, everybody on that server gets the same crosshair, which is the fair version. Ask before you install it on a server you do not own.
How do I get rid of GTA’s own reticle underneath it?
HideHudComponentThisFrame(14) — component 14 is RETICLE in the FiveM HUD component list. The important word is ThisFrame: it has to be called every single frame, so it needs a thread running at Wait(0), and the moment your resource stops the reticle comes back. The client.lua in the download has that thread behind a HIDE_GAME_RETICLE flag, switched off by default, because most people actually want both — the game reticle tells you about weapon spread, and the overlay gives you a fixed point. Turn it on only if the two together look like a mess.
My NUI page is covering the whole screen with a solid colour. Why?
Because a NUI page is the whole screen. The page is composited over the game at full size, so any background you give html or body is painted over everything — this is the single most common mistake with overlay resources, and it looks like the game has crashed. The generated index.html sets background: transparent on both, plus overflow: hidden so nothing can scroll into view and pointer-events: none so the layer is inert. If you edit the file, do not add a background colour, and do not remove those two lines.
What are the PNG and the SVG for, if the resource is the HTML one?
Three things, honestly. The PNG at 4x or 8x is for showing the design to other people — a Discord post, a store page, a readme — because a screenshot of a two-pixel crosshair is useless. The SVG is for editing it somewhere else, since it is plain geometry and opens in any vector editor. And if you would rather draw the crosshair with DrawSprite instead of a web page, the PNG is your starting texture: it has to be built into a texture dictionary (.ytd) with OpenIV or CodeWalker and streamed by a resource before DrawSprite can use it, which is more work than the HTML route and is why the zip ships the HTML one.

ALSO FREE

Tools that go with this one

Picked because they touch the same files, natives or part of the game.

FROM THE SHOP

What we build when it is not free

The free tools and the paid work come out of the same place. These are the lines closest to what this page is about.

Grand opening: 25% off every product with FAM-261023-261025-UL4B9, until 25 October. It is applied at checkout.

The Downtown Dusk graphics design, shown at Discord banner size
Graphics packs

Graphics packs for FiveM

One design, cut to every slot your server shows up in: the server list strip, the Discord header, the stream art, each composed for its own crop.

From $12.00124 designs · 20 formatsBrowse the designs
Loading screens

Loading screens for FiveM

The one screen every player sees on every connect. Drag widgets onto a canvas, drop in a video background, and point your server at a single URL we host.

Free50 live widgets · 30 fontsOpen the screen builder
The Onyx weapon wheel design in polished black glass, drawn over the game HUD
Weapon wheels

Weapon wheels for FiveM

A native hud.gfx replacement rather than an NUI overlay, so it costs no frame time. Colours, shape and motion are yours before you pay.

From $15.0050 wheel designsBrowse the wheels