[Dev-Resource] Mythic Hospital (Body Part Damage & Healing)

what exactly heals a limp. Apparently people spawn in with limps and you need to attitude chsnge to fix it? Sometimes a medkit fixes it? So confused rn

Great script, I’ve slightly edited it so a broken bone symbol appears and starts flashing when your character starts limping to indicate the user that they need to pay a visit to the hospital to get healed.

1 Like

Can share it bra?

Sure, mythic_hospital.rar (75.3 KB)
I used the code off a seatbelt script too implement it so ignore the image name etc. I was just being lazy.

2 Likes

im still getting this error when trying to check in. I walk up to the desk press ‘e’ and then it does nothing and throws this into the console. anyone have this happening or am i just missing something easy

You’re calling it on the client so it’s resetting limbs & removing bleed from the person perform the action.

Easiest thing to do is add a client call on the server event that heals the closest player passing that server id that’s getting passed to it. Or add those event calls to whatever event the esx_ambulancejob:heal server event is triggering

Certain limbs being injured causes the limp, and the limp is checked for every second and if they have an injured limb it sets the clipset. So healing it is just literally removing the injured limb status.

Do you have my progress bar script installed and named mythic_progbar? Error is self-explanatory, it cannot find an exported function Progress in a resource named mythic_progbar.

Thanks! Works.

1 Like

will check the new updates thank you again

I have reemplaced ur folder and for some reason its not showing that image when i am injuried

I’m having an issue where my player gets stuck with the clipboard in his hand. It woulds if I die and respawn in a bed. Not sure what the issue is.

It only appears when the person has a limp.

Is the event and everything firing off when they check in?

If props aren’t despawned during an action using my progress bar, it means the callback isn’t working correctly so the cleanup function to delete props isn’t called. Usually caused by improperly name resource for mythic_progbar (If you want to rename it, you have to change the NUI callback addresses in the JavaScript)

I have some problems with this script…

Of 70 players, sometimes there are people who never got injuried.

Anothers injuried only with 1 jump without hitting.

They also enter in checkin, go to the bed, finish service and again injuried before get out of hospital.

Adding damage modifier like this

Citizen.CreateThread(function()
    while true do
	N_0x4757f00bc6323cfe(GetHashKey("WEAPON_UNARMED"), 0.1)
	SetPlayerHealthRechargeMultiplier(PlayerId(), 0.0)
	Wait(0)
    end
end)

breaks sprinting after healing in bed. Any ideas what is going on??

What should i edit so people can only get injured if they get shot with a gun. I just don`t want the possibility of getting injured when falling from somewhere or getting hit by a car and etc…

More info as to if there’s errors or not would be great, as at its core it’s all revolving around a native call. I don’t have any access to testing on OneSync servers with people so it’s not been tested to that extent.

No idea tbh, if you remove the sprint modifying stuff does it still break it?

On a side note, why are you calling SetPlayerHealthRechargeMultiplier every frame when it just needs to be called once?

Easiest thing to do is just remove the weapons from the tables at the top of Wound.lua. Additionally can add checks for weapons / weapon classes and skip damaging limbs if the damaging weapon was from those.

I want to leave the weapon damage… I want to remove the damage thats caused by getting hit by a car or falling from a big building.

Mhm, there’s weapons hashes for that which are passed through to the bone damage native which is how you get them. If you don’t want them to inflict damage, remove them from the weapons list and they won’t be checked.

    [`WEAPON_FALL`] = WeaponClasses['OTHER'], -- Fall
    [`WEAPON_HIT_BY_WATER_CANNON`] = WeaponClasses['OTHER'], -- Water Cannon
    [`WEAPON_RAMMED_BY_CAR`] = WeaponClasses['OTHER'], -- Rammed
    [`WEAPON_RUN_OVER_BY_CAR`] = WeaponClasses['OTHER'], -- Ran Over

This is what I done to resolve this issue. I am using the ESX version.
Comment out the exports line in the hospital client/main.lua around line 151
Add the single TriggerEvent line directly below it, see example image

The damage and bleeding seems pretty severe. In testing after getting hit by a car I rag doll after only a few seconds. Is there a way to reduce the effects of bleeding out and blacking out? Even just damage severity in general. What I want is for the bleed to be a very small incremental drain on health that forces players to seek medical attention rather than something that kills them.