function GetCharsInjuries(source)
return playerInjury[source]
end
RegisterServerEvent(‘mythic_hospital:server:SyncInjuries’)
AddEventHandler(‘mythic_hospital:server:SyncInjuries’, function(data)
local src = source
local char = exports[‘mythic_base’]:getPlayerFromId(src).getChar()
local cData = char.getCharData()
It’s not working because you didn’t replace it with one of the above solutions, replace the entirety of the mythic_hospital:server:SyncInjuries event with
RegisterServerEvent('mythic_hospital:server:SyncInjuries')
AddEventHandler('mythic_hospital:server:SyncInjuries', function(data)
playerInjury[source] = data
end)
That’s default GTA 5’s health regen afaik, add SetPlayerHealthRechargeMultiplier(PlayerId(), 0.0) to a client script (Only need to run it once)
By chance, do they not have any limb damage and just trying to heal their HP? Just realized there is an error with that. Will push a fix that will hopefully fix this for you
Yes, they were taking fall damage and testing it, im guessing id have to add the complete body index to include all the parts they could be injuring? (ie, face, eyebrow, lips) etc?
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
With
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