both esx and qb? cause i already tried with removing the QB imports.lua
its using the esx ambulance revive, you probably have the configs in esx ambulance set to remove money and items on respawn.
removed both imports and now the ems comes out but no revive after paying. also does the same with the esx imports.
Which ambulance job are you using buddy?
Hey mate please use the updated version !
default ambulance job for esx
this looks great. thanks for making this free!
Im using QB itsnt work properly can u fix it
Progress Bar working on load time
Getting the same - as soon as the player loads, the progressbar appears.
The code has been updated to support most of the old/new QB/ESX !
This is really cool - just having an issue with it automatically triggering when players fly in to the character selection screen. Canβt seem to figure out why it happens, any ideas?
Just realized the two above your last comment are having same issue. So +1 to them lol.
ATTENTION!
The script has been updated we have separated the ESX and QB version, even after this if you face issues please let me know.
Same for me also
function SpawnVehicle(x, y, z)
spam = false
local vehhash = GetHashKey("ambulance")
local loc = GetEntityCoords(PlayerPedId())
RequestModel(vehhash)
while not HasModelLoaded(vehhash) do
Wait(1)
end
RequestModel('s_m_m_doctor_01')
while not HasModelLoaded('s_m_m_doctor_01') do
Wait(1)
end
local spawnRadius = 100
local found, spawnPos, spawnHeading = GetClosestVehicleNodeWithHeading(loc.x + math.random(-spawnRadius, spawnRadius), loc.y + math.random(-spawnRadius, spawnRadius), loc.z, 0, 3, 0)
if not DoesEntityExist(vehhash) then
mechVeh = CreateVehicle(vehhash, spawnPos, spawnHeading, true, false)
ClearAreaOfVehicles(GetEntityCoords(mechVeh), 5000, false, false, false, false, false);
SetVehicleOnGroundProperly(mechVeh)
SetVehicleNumberPlateText(mechVeh, "HHFW")
SetEntityAsMissionEntity(mechVeh, true, true)
SetVehicleEngineOn(mechVeh, true, true, false)
mechPed = CreatePedInsideVehicle(mechVeh, 26, GetHashKey('s_m_m_doctor_01'), -1, true, false)
mechBlip = AddBlipForEntity(mechVeh)
SetBlipFlashes(mechBlip, true)
SetBlipColour(mechBlip, 5)
PlaySoundFrontend(-1, "Text_Arrive_Tone", "Phone_SoundSet_Default", 1)
Wait(2000)
TaskVehicleDriveToCoord(mechPed, mechVeh, loc.x, loc.y, loc.z, 20.0, 0, GetEntityModel(mechVeh), 524863, 2.0)
test = mechVeh
test1 = mechPed
Active = true
Citizen.CreateThread(function()
while true do
Citizen.Wait(200)
if Active or Act then
local loc = GetEntityCoords(GetPlayerPed(-1))
local lc = GetEntityCoords(test)
local ld = GetEntityCoords(test1)
local dist = Vdist(loc.x, loc.y, loc.z, lc.x, lc.y, lc.z)
local dist1 = Vdist(loc.x, loc.y, loc.z, ld.x, ld.y, ld.z)
if dist <= 20 then
if Active then
TaskGoToCoordAnyMeans(test1, loc.x, loc.y, loc.z, 1.0, 0, 0, 786603, 0xbf800000)
end
if dist1 <= 1 then
Active = false
Act = false
ClearPedTasksImmediately(test1)
DoctorNPC()
end
end
end
end
end)
end
end
i tried like this now working well for me!
Not appearing Progress bar when loading time
Citizen.CreateThread(function()
while true do
Citizen.Wait(200)
if Active or Act then
local loc = GetEntityCoords(GetPlayerPed(-1))
local lc = GetEntityCoords(test)
local ld = GetEntityCoords(test1)
local dist = Vdist(loc.x, loc.y, loc.z, lc.x, lc.y, lc.z)
local dist1 = Vdist(loc.x, loc.y, loc.z, ld.x, ld.y, ld.z)
if dist <= 20 then
if Active then
TaskGoToCoordAnyMeans(test1, loc.x, loc.y, loc.z, 1.0, 0, 0, 786603, 0xbf800000)
end
if dist1 <= 1 then
Active = false
Act = false
ClearPedTasksImmediately(test1)
DoctorNPC()
end
end
end
end
end)
Remove these from the client.lua
Please do a PR on GitHub if possible.
very nice updat enow its work for me on esx good job!
but i have the problem that when i connect then i get revived after connect and progressbar shown on connect
My only problem for ESX is that after NPC revives me instead of hopping back in Ambulance & driving away & driving away he walks away & ambulance vehicles are left over anyway to fix this?
I have made a few changes please check now it should have been fixed!