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

How can I add this Triggers for Medikit also? can you help?

i got the fix if goto esx_ambulancejob/server/main.lua line:246
You will see ESX.RegisterUsableItem(‘medikit’, function(source)
just replace the code with my one

ESX.RegisterUsableItem(‘medikit’, function(source)

if not playersHealing[source] then

    local xPlayer = ESX.GetPlayerFromId(source)

    xPlayer.removeInventoryItem('medikit', 1)

    playersHealing[source] = true

    TriggerClientEvent('esx_ambulancejob:useItem', source, 'medikit')

    TriggerClientEvent('mythic_hospital:client:ResetLimbs', source)

    TriggerClientEvent('mythic_hospital:client:RemoveBleed', source)

    Citizen.Wait(10000)

    playersHealing[source] = nil

end

end)

Exports are not working as it should be for every script. Sometimes it says there is no export like “send alert” in x and x reource. That’s just FiveM issue or ESX issue.

One way to fix it is keeping the reource which needs to use exports above the resource which exports in server.cfg

It’s the best script I’ve seen in my life: D. but I have a problem healing in the hospital, he doesn’t get me out of bed and stays in bird’s eye view and I get this message:
citizen:/scripting/lua/scheduler.lua:924: No such export DoHudText in resource Mythic_notify

I receive notifications, and I have looked in the notify and I don’t have that file, nor is it in the github. the first messages you speak of a /hurt.lua but I can’t find it either :frowning:
sorry for my bad english

So i use this https://github.com/Quostix/mythic_hospital but when i bleed i cant stop it with bandage or any of the items how to i fix this?=

Add

"TriggerClientEvent('mythic_hospital:client:ResetLimbs', source)

TriggerClientEvent('mythic_hospital:client:RemoveBleed', source)"

where bandage and medikit is used in esx_ambulancejob.

How to enable death check in in pillbox.I am not able to checkin when i am dead

i have changed the x y z of the beds but headings wont change, looks silly with the char facing the wrong way in bed… anyone got a fix?

i need after dead revive scprit ??? help me???

Goto esx_ambulnacejob/main.lua line: 87 find and changed the line to EnableAllControlActions(0)

Citizen.CreateThread(function()

while true do

    Citizen.Wait(0)

    if isDead then

       DisableAllControlActions(0)  --[[ Change to EnableAllControlActions(0) or comment the line ]]--

        EnableControlAction(0, Keys['G'], true)

        EnableControlAction(0, Keys['T'], false)

        EnableControlAction(0, Keys['E'], true)

    else

        Citizen.Wait(500)

    end

end

end)

1 Like

hello, anyone knows how to make items work?

So to fix the current esx version to get the bill to be taken out of the players bank you need to do the following:

Navigate to \server\billing.lua
Move return true from line 11 and place it after xPlayer.removeBank(amount)

This allows the player to get put in bed then get the total bill amount taken out of his bank once the treatment is done.

I made this change on my server and now the total bill is coming out of my players bank after he has been treated in the bed.

1 Like

anyone can give me a working billing code for the esx ?

i tried to edit the server/billing to this but no luck

RegisterServerEvent(‘mythic_hospital:server:EnteredBed’)
AddEventHandler(‘mythic_hospital:server:EnteredBed’, function()
local src = source
local injuries = GetCharsInjuries(src)
local xPlayer = ESX.GetPlayerFromId(src)

local totalBill = injuryBasePrice

    if injuries ~= nil then
    for k, v in pairs(injuries.limbs) do
        if v.isDamaged then
            totalBill = totalBill + (injuryBasePrice * v.severity)
        end
    end

    if injuries.isBleeding > 0 then
        totalBill = totalBill + (injuryBasePrice * injuries.isBleeding)
    end
end

xPlayer.removeMoney(totalBill)
TriggerClientEvent('mythic_hospital:client:FinishServices', src)

end)

function BillPlayer(source, amount)
return true
end

wont work for me i get errors in billing and no such export in mythic progbar ):

how you solved this?

when will an update come out for ESX?

where do you add these lines i have tried many different spots and nothing works. Where i have them now players can reset their own limbs and stop their own bleeding but ems can not and i just dont understand where to put those lines to make it work.

Where is the download?

I’m using ESX version, and i have no problem except that i can’t enable death check in pillbox, or hidden hospital, I am not able to checkin when i am dead. Any idea why?

Yes, your esx_ambulancejob is preventing you from pressing E while dead, you can simply fix this by turning off the option in your esx_ambulancejob/client/main.lua

1 Like

I checked that, but still not workingAnotación 2020-02-03 162006