[Release] Scrubz Hud

– Scrubz Hud –

[Update]

So unfortunately one of my hdd’s crashed, and I lost alot of data on it. And this resource happened to be one of the few projects not backed up in a repo. :confused: Feelsrealbad. So I no longer have the source code for this hud. ://///// But I am already hard at work on v2, so that will be coming #soon.

[Streamable] <— Showcase

I decided I wanted to recreate nopixels hud as an introduction of sorts to React. I have NO previous knowledge/experience in js/css/html, so yes I know the menu is superrrr rough looking and extremely amateurish, just please bear in mind that I’m like ~2-3 weeks into learning so be nice to me!!

I decided to remove some features from the hud in order to make this a public release (doesn’t include the multiple hud styles to choose from and a built in needs system). That being said, I am NOT providing any support for this, as this was mainly meant as a learning experience and NOT a project that I have plans on staying active on.

[Information]

  • Colors do save. This is done via localStorage NOT a database.
  • Resource runs at 0.01ms constant. There really isn’t much going on under the hood lua wise, so you should have NO issues with this resource being heavy AT ALL.
  • No, I have NO plans on adding, changing, or editing anything.
  • Unless there is something resource breaking inside the frontend, any and all changes made to it will have to be done by you.
  • This is standalone, and not framework dependent.

[Requirements]

  • Having a higher iq than a wet paper bag.

[!!!EDIT!!!]

I forgot to mention, but if you want to change out the icons, THEY MUST BE NAMED THE SAME AS THE ORIGINAL…INCLUDING THE HASHING (image.xxxxxxxx.svg)

[FAQ]

Q: [Generic voice chat questions]
A: I have no experience with mumble so idk. As far as he-who-must-not-be-named, read the docs and utilize the exports provided you dirty muggle.

Q: When I close the hud menu, my cursor stays on the screen (nui doesn’t unfocus).
A: If you’re going to be a renaming andy, then change everything that’s needed, or rename the resource back to ‘scrubz_hud’.

Q: Can I get an ‘uwu’??
A: uwu

[Download Here] <— Github Repo

25 Likes

Good release Scrubz, Glad you ended up getting it squared away!

1 Like

Great release Scrubz you genius.

Arigatou senpai ≧◡≦

1 Like

I know your readme says you don’t want people to sell it but you attached a GPL license to it. Which allows for commercial use. This is why people are able to sell certain phone re-writes :face_vomiting: gcphone. You should adjust your license to reflect your views. With your license being in it’s current state, someone can come along and add ESX support and sell it on Tebex :man_shrugging:

I respect others work and wouldn’t do this, but you should most certainly adjust your license :).

5 Likes

You’re actually right. Thanks for pointing that out. <3

1 Like

No problem <3 Thank you for the release :slight_smile:

1 Like

Well Done mate

Hi i have a question i have added this but for some reason its not showing is there anything i need to do for it to show in-game i added it to esx_status like so TriggerEvent(‘scrubz_hud:onTick’, GetStatusData(true)) i am also able to open the ui via commands but like said there is no hud showing sorry if i am missed something.:slight_smile:

2 Likes

same
… idk why :smiley:

1 Like

same here :smiley: did try to find out in other UI huds … but no go … we are just to stupid :smiley: help us :smiley:

1 Like

If you actually read the docs it tells you what to do. The following event needs to be triggered for the hud to show up. (Rather the nui message being sent is what makes the hud show).

RegisterNetEvent('ScrubzHud:Init')
AddEventHandler('ScrubzHud:Init', function()
    local plyPed = PlayerPedId()
    local currentHealth = GetEntityHealth(plyPed) - 100
    local currentArmor = GetPedArmour(plyPed)
    Data.Health = currentHealth
    Data.Armor = currentArmor
    -- Also grab current needs values (0 - 100 scale)
    SendNUIMessage({
        type = 'init',
        health = currentHealth,
        armor = currentArmor,
        hunger = hungerValue,
        thirst = thirstValue,
        stress = stressValue
    })
    Data.PlayerLoaded = true
end)
1 Like

As far as scrubz_hud:onTick this goes. That event doesn’t exist. Why add new events when you can just add an export to your needs resource that returns the needed values instead. Don’t over complicate shit unnecessarily.

1 Like

Because i use esx_basicneeds & thought this hud would work like other huds where you need to export it from esx_status not simple just add an export to basicneeds. :slight_smile:

& so are you saying if i just add this to esx_basicneeds on the client.lua it will then work because i added that & still doe’s not show after doing init update showmenu only thing what shows is the showmenu part lol. :slight_smile:

What?? No. I’m saying that event needs to be TRIGGERED for the hud to show.

It doesn’t matter in the end how you get the values, you just need to grab the values needed and send the nui message. I didn’t write this to be plug and play with esx. I made it as simple as possible to handle integrating it into whatever code you’re using. I don’t know how else to help you without holding your hand and I won’t do that.

1 Like

Always one of the best out there! Awesome work my dirty American :wink:

1 Like

Such a nice release, it’s even free damn! Great work dude!

<3 uwuuuuu

If you use esx_kashacters here is how you will make the hud work with it:
Go to esx_kashacters/client/main.lua, click CTRL + F and search for esx_ambulancejob, go one line down and write: TriggerEvent('scrubz_hud:Init', source)
So it should look like this:

RegisterNetEvent('kashactersC:SpawnCharacter')
AddEventHandler('kashactersC:SpawnCharacter', function(spawn, isnew)
    TriggerServerEvent('es:firstJoinProper')
    TriggerEvent('es:allowedToSpawn')

    SetTimecycleModifier('default')
    local pos = spawn
    SetEntityCoords(GetPlayerPed(-1), pos.x, pos.y, pos.z)
    DoScreenFadeIn(500)
    Citizen.Wait(500)
    cam2 = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", -1355.93,-1487.78,520.75, 300.00,0.00,0.00, 100.00, false, 0)
    PointCamAtCoord(cam2, pos.x,pos.y,pos.z+200)
    SetCamActiveWithInterp(cam2, cam, 900, true, true)
    Citizen.Wait(900)
    exports.spawnmanager:setAutoSpawn(false)
    TriggerEvent('esx_ambulancejob:multicharacter', source)
    TriggerEvent('scrubz_hud:Init', source)