[QBCore] Re enabling crosshair

I’d like to re enable the crosshair but unsure on how to do so. I’ve tried looking through files but haven’t found anything yet

10 Likes

I don’t use QBCore myself so I don’t exactly know how, but I think you could search it from the code by searching for HideHudComponentThisFrame(14)

1 Like

I have tried this when I was looking but there’s just so much to look through and I’m not sure exactly where the right place would be to look

1 Like

qb-smallresources/client/hudcomponents.lua/comment out HideHudComponentThisFrame(14)

13 Likes

Small tip for the future. Open the resources folder in Visual Studio Code, and from the left bar press the search icon. That way you can look for something specific from every resource you have.

3 Likes

Thank you! I actually hadn’t seen that folder

ty so much bro :heart:

when i find it how do i enable it/

Replace HideHudComponentThisFrame(14) with --HideHudComponentThisFrame(14)

You need the two lines in front of it to comment it out. Or if you’d like you can just remove it.

3 Likes

Thankyou! that worked

Worked! :heart:

ima dl this n try

I’m just now building my server with QBCore, so I’m still learning and running into these issues as well. This post just helped me a lot.

Here is how I enabled my reticle. It gives you a little more flexibility in enabling and disabling HUD components.


I went to qb-smallresources → client → hudcomponents.lua and saw that it uses data from the ‘qb-smallresources config.lua’

Here is the Disable code where you can configure what HUD components you wish to disable or not.

As usual, always make a backup copy of the original files.

(qb-smallresources config.lua)

Config.Disable = {
– hudComponents = { 1, 2, 3, 4, 7, 9, 13, 14, 19, 20, 21, 22 }, – Hud Components original: Remarked out.
– Remove 14 to enable reticle
hudComponents = { 1, 2, 3, 4, 7, 9, 13, 19, 20, 21, 22 }, – Hud Components: HideHudComponentThisFrame - FiveM Natives @ Cfx.re Docs
controls = { 37 }, – Controls: Controls - Cfx.re Docs
displayAmmo = true, – false disables ammo display
ambience = false, – disables distance sirens, distance car alarms, flight music, etc
idleCamera = true, – disables the idle cinematic camera
vestDrawable = false, – disables the vest equipped when using heavy armor
pistolWhipping = true, – disables pistol whipping
driveby = false, – disables driveby
}


This link references the different HUD component ID numbers:

Listed below are the integers and the corresponding HUD component.

1 : WANTED_STARS
2 : WEAPON_ICON
3 : CASH
4 : MP_CASH
5 : MP_MESSAGE
6 : VEHICLE_NAME
7 : AREA_NAME
8 : VEHICLE_CLASS
9 : STREET_NAME
10 : HELP_TEXT
11 : FLOATING_HELP_TEXT_1
12 : FLOATING_HELP_TEXT_2
13 : CASH_CHANGE
14 : RETICLE
15 : SUBTITLE_TEXT
16 : RADIO_STATIONS
17 : SAVING_GAME
18 : GAME_STREAM
19 : WEAPON_WHEEL
20 : WEAPON_WHEEL_STATS
21 : HUD_COMPONENTS
22 : HUD_WEAPONS