{"id":199002,"date":"2025-09-22T07:58:34","date_gmt":"2025-09-22T05:58:34","guid":{"rendered":"https:\/\/fivemx.com\/?p=199002"},"modified":"2026-07-20T12:36:33","modified_gmt":"2026-07-20T10:36:33","slug":"fivem-como-remover-a-mira","status":"publish","type":"post","link":"https:\/\/fivemx.com\/pt\/fivem-como-remover-a-mira\/","title":{"rendered":"Como Remover o Ret\u00edculo em FiveM (HideHudComponentThisFrame 14)"},"content":{"rendered":"<p><strong>Fast answer:<\/strong> FiveM servers remove the default GTA crosshair \u2014 HUD component <code>14<\/code>, the reticle \u2014 by running <code>HideHudComponentThisFrame(14)<\/code> every frame in a client script. The call must run on the client, inside a loop, because HUD components render again on the next frame. Below: the copy-paste resource, an optional player toggle command, and fixes for a crosshair that keeps coming back.<\/p>\n<p><em>Last updated: June 25, 2026<\/em><\/p>\n<h2>Copyable client script<\/h2>\n<p>Create a small client resource and put this in <code>client.lua<\/code>:<\/p>\n<pre><code>CreateThread(function()\n while true do\n Wait(0)\n HideHudComponentThisFrame(14)\n end\nend)<\/code><\/pre>\n<p>The official Cfx.re native reference lists <a href=\"https:\/\/docs.fivem.net\/natives\/?_0x6806C51AD12B83B8=\" rel=\"nofollow noopener\" target=\"_blank\">HideHudComponentThisFrame<\/a> as the native for hiding HUD components. Component <code>14<\/code> is the reticle\/crosshair.<\/p>\n<h2>Minimal fxmanifest.lua<\/h2>\n<p>Place this next to <code>client.lua<\/code> in a resource folder, for example <code>resources\/[local]\/no-crosshair\/<\/code>:<\/p>\n<pre><code>fx_version 'cerulean'\ngame 'gta5'\n\nclient_script 'client.lua'<\/code><\/pre>\n<p>Then add the resource to <code>server.cfg<\/code>:<\/p>\n<pre><code>ensure no-crosshair<\/code><\/pre>\n<h2>Why it has to run every frame<\/h2>\n<p>HUD hiding is frame based. Calling the native once can look like it worked for a moment, but the reticle returns because GTA renders HUD components again on later frames. Keep the loop lightweight and do not add expensive logic inside it.<\/p>\n<h2>Player-side vs server-side crosshair removal<\/h2>\n<table>\n<thead>\n<tr>\n<th>Goal<\/th>\n<th>Best method<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Remove the default GTA reticle for everyone<\/td>\n<td>Use a small client resource with <code>HideHudComponentThisFrame(14)<\/code>.<\/td>\n<\/tr>\n<tr>\n<td>Let players choose<\/td>\n<td>Add a client setting or command that toggles the loop.<\/td>\n<\/tr>\n<tr>\n<td>Remove a custom weapon HUD<\/td>\n<td>Check the weapon\/HUD resource. It may draw its own crosshair.<\/td>\n<\/tr>\n<tr>\n<td>Stop monitors or overlays adding a dot<\/td>\n<td>Check client overlays, monitor features, and graphics mods.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Optional toggle command<\/h2>\n<p>If your server wants a player toggle, use a local variable:<\/p>\n<pre><code>local crosshairHidden = true\n\nRegisterCommand('crosshair', function()\n crosshairHidden = not crosshairHidden\n print(crosshairHidden and 'Crosshair hidden' or 'Crosshair visible')\nend, false)\n\nCreateThread(function()\n while true do\n Wait(0)\n if crosshairHidden then\n HideHudComponentThisFrame(14)\n end\n end\nend)<\/code><\/pre>\n<h2>Troubleshooting<\/h2>\n<ul>\n<li>If the crosshair still appears, another HUD or weapon resource may be drawing its own element.<\/li>\n<li>If the resource does not start, verify the <a href=\"https:\/\/fivemx.com\/setting-up-fxmanifest-lua-fivem\/\">fxmanifest.lua setup<\/a>.<\/li>\n<li>If only one player sees a dot, check monitor overlays or graphics tools on that PC.<\/li>\n<li>If you need a full HUD pass, compare <a href=\"https:\/\/fivemx.com\/fivem-hud\/\">FiveM HUD resources<\/a>.<\/li>\n<\/ul>\n<h2>FAQ<\/h2>\n<h3>Can this be done in server.lua?<\/h3>\n<p>No. HUD rendering is client-side. Trigger a client event if you need server logic, but call the native in client code.<\/p>\n<h3>Does this affect custom scopes?<\/h3>\n<p>It hides the default reticle component. Custom weapon scripts, scopes, or NUI overlays may still draw their own UI.<\/p>\n<section data-fivemx-rework-extra=\"2026-06-25\">\n<h2>Server-side rollout checklist<\/h2>\n<p>Before adding this to a live roleplay server, test it with the weapons and HUD resources your players already use. A default reticle can be hidden by component 14, but many servers also run weapon overlays, custom scopes, or NUI HUDs. Those scripts may draw their own crosshair and need separate settings.<\/p>\n<ol>\n<li>Create the resource on a staging server.<\/li>\n<li>Test pistols, rifles, shotguns, melee weapons, and unarmed movement.<\/li>\n<li>Check first-person and third-person view.<\/li>\n<li>Open the inventory, radial menu, weapon wheel replacement, and HUD.<\/li>\n<li>Ask one tester with a clean client and one tester with normal overlays to compare.<\/li>\n<\/ol>\n<h2>How to debug a crosshair that comes back<\/h2>\n<p>If the dot returns only while aiming, your code may not be running every frame. If it returns only with one weapon or one job, a weapon or police resource may draw the UI. If it appears only for one player, check monitor crosshair features, ReShade overlays, GPU overlays, or accessibility tools on that PC.<\/p>\n<h2>Good server policy wording<\/h2>\n<p>If your server bans external crosshairs, write the rule clearly: no monitor crosshair, no overlay crosshair, no third-party aiming dot. Then enforce it with staff review rather than relying only on a script that hides the default HUD reticle.<\/p>\n<\/section>\n<section data-fivemx-quality-wave=\"2026-07-01:199002\">\n<h2>When the crosshair comes back<\/h2>\n<p>If the dot returns only while aiming, the client loop may not be running every frame. If it returns only with one weapon or job, another weapon, HUD or police resource may draw its own aiming UI. If it appears for one player only, check monitor crosshair features, GPU overlays, ReShade overlays and accessibility tools on that PC.<\/p>\n<h2>Server rule wording<\/h2>\n<p>If your community bans external crosshairs, say exactly what is banned: monitor crosshair, overlay crosshair, third-party aiming dot and modified HUD reticle. A script can hide the default GTA HUD component, but it cannot police every external display feature by itself.<\/p>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>Fast answer: FiveM servers remove the default GTA crosshair \u2014 HUD component 14, the reticle \u2014 by running HideHudComponentThisFrame(14) every frame in a client script. The call must run on the client, inside a loop, because HUD components render again on the next frame. Below: the copy-paste resource, an optional player toggle command, and fixes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":199003,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2340,1902,1899],"tags":[3001],"class_list":["post-199002","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-lua-scripting","category-fivem-related","category-tutorials","tag-fivem-script"],"_links":{"self":[{"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/posts\/199002","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/comments?post=199002"}],"version-history":[{"count":4,"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/posts\/199002\/revisions"}],"predecessor-version":[{"id":213814,"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/posts\/199002\/revisions\/213814"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/media\/199003"}],"wp:attachment":[{"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/media?parent=199002"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/categories?post=199002"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemx.com\/pt\/wp-json\/wp\/v2\/tags?post=199002"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}