Permanent fix for Female (Ped) HP IN ALL HUDS

Specifically made this fix for Kato, saw his thread and its typical to see no responses after a few days… This community lol.

  • Reply if you need help
    With your specific hud, whether it’s trew hud, np hud, qbus hud, flat hud, esx_hud, kl_hud, ln-hud, unknownlife_hud, nzy-hud, etc; disclaimer, most of the huds you download in public are already going to have this fix implemented, which is typically invisible to the naked eye for new server developers/creators!
    Health in the HUD BEFORE the change https://prnt.sc/ugod2g
    Code BEFORE the change https://prnt.sc/ugoe4l

Health in the HUD AFTER the change https://prnt.sc/ugoeld
Code AFTER the change https://prnt.sc/ugof9e

tl;dr

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(1)
				if GetEntityMaxHealth(GetPlayerPed(-1)) ~= 200 then
			SetEntityMaxHealth(GetPlayerPed(-1), 200)
			SetEntityHealth(GetPlayerPed(-1), 200)
		end

If you need help putting this where it needs to be, just reply here, If I can’t get to you then I’m sure someone else who used this fix can help you :slight_smile:
This is the proper way, other post’s I’ve read, didn’t really explain it much when I first got started, but since then I haven’t had any issues with this way of doing it, just make sure its at the top of where your huds Citizen.CreateThread(function() is declared after the while true do statement, the screenshots will explain it if you’re new, just reference those and see how your code is, compare it and see how you can implement this simple block into your own hud’s code. :slight_smile: <3

4 Likes

this is the code for enzy-hud


Were do I put the Code ? :slight_smile:

Also thank you for the help. <3

–General UI Updates

Citizen.CreateThread(function()
    Citizen.Wait(0)
    SendNUIMessage({
        action = 'showui'
    })

    while true do
		if GetEntityMaxHealth(GetPlayerPed(-1)) ~= 200 then
			SetEntityMaxHealth(GetPlayerPed(-1), 200)
			SetEntityHealth(GetPlayerPed(-1), 200)
		end
        local player = PlayerPedId()

        SendNUIMessage({
            action = 'tick',
            show = IsPauseMenuActive(),
            health = (GetEntityHealth(player) - 100),
            armor = GetPedArmour(player),
            stamina = 100 - GetPlayerSprintStaminaRemaining(PlayerId()),
            --stamina = 25 + GetPlayerUnderwaterTimeRemaining(PlayerId()),
        })
        Citizen.Wait(200)
    end
end)
3 Likes

You’re a Legend Dude !

1 Like

But then all PEDs have 200 HP when connecting, right? Even if they were hurt, or am I thinking wrong?

1 Like

Ah, indeed you are correct, 200 HP for both peds, whether it’s male or female, in FiveM, female ped’s originally have 175, or that is “mp_f_freemode” ped’s, not sure why, not sure how, but with these simple lines of nothingness, this breaks that sort of barrier, and allows all ped’s to equally have 200 HP, because originally that’s how much HP the male Ped would have, and or the female Ped should have, but to break that “sexist” barrier that people think is going on, this is just that simple fix, but to shorten it, this script wont mean much and therefore if someone who wanted a simple fix for their hud, they would just use these simple lines rather than just making a smaller issue, much larger than it should be. It’s due to the fact, these newer huds, deriving from “NoPixel’s” style of doing it, they sort of leave out those little thing’s. To scratch off your second question, when they are hurt, I’m not sure if you are asking, “does their health go down when hurt?” or “does their health go down but in that range from 200 hp to whatever hp they were hurt for?”, to answer in that second form, their hp will decrease just as normally, and when healed, will return back to 200. Nothing, big, nothing more, lol sorry for the essay.

Amazing. Thanks!

will this make the female ped to look like that in the picture

@DevBear

1 Like

I did this a long time ago :slight_smile:

It’s maybe only on the dev branch though

2 Likes

Did you figure out how to fix it?