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
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
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
sorry for my bad english
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
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
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.
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