diff --git a/hh_aidoc[QB]/client.lua b/hh_aidoc[QB]/client.lua index 4152bb1..e83520a 100644 --- a/hh_aidoc[QB]/client.lua +++ b/hh_aidoc[QB]/client.lua @@ -5,8 +5,6 @@ local test = nil local test1 = nil local spam = true - - RegisterCommand("help", function(source, args, raw) if (QBCore.Functions.GetPlayerData().metadata["isdead"]) or (QBCore.Functions.GetPlayerData().metadata["inlaststand"]) and spam then @@ -31,10 +29,9 @@ RegisterCommand("help", function(source, args, raw) end) - function SpawnVehicle(x, y, z) spam = false - local vehhash = GetHashKey("ambulance") + local vehhash = GetHashKey("jeep") --- custom gta 5 mod https://www.gta5-mods.com/vehicles/2016-ford-explorer-fpiu-qrv-saems-els local loc = GetEntityCoords(PlayerPedId()) RequestModel(vehhash) while not HasModelLoaded(vehhash) do @@ -44,17 +41,18 @@ function SpawnVehicle(x, y, z) while not HasModelLoaded('s_m_m_doctor_01') do Wait(1) end - local spawnRadius = 40 + local spawnRadius = 300 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") + SetVehicleNumberPlateText(mechVeh, "EMS") SetEntityAsMissionEntity(mechVeh, true, true) SetVehicleEngineOn(mechVeh, true, true, false) - + SetVehicleSiren(mechVeh, true) + mechPed = CreatePedInsideVehicle(mechVeh, 26, GetHashKey('s_m_m_doctor_01'), -1, true, false) mechBlip = AddBlipForEntity(mechVeh) @@ -80,7 +78,7 @@ Citizen.CreateThread(function() 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 <= 10 then + if dist <= 20 then -- old was 10 if Active then TaskGoToCoordAnyMeans(test1, loc.x, loc.y, loc.z, 1.0, 0, 0, 786603, 0xbf800000) end @@ -114,9 +112,9 @@ function DoctorNPC() StopScreenEffect('DeathFailOut') Notify("Your treatment is done, you were charged: "..Config.Price, "success") RemovePedElegantly(test1) + Wait(30000) --5000 DeleteEntity(test) - Wait(5000) - DeleteEntity(test1) + --DeleteEntity(test1) spam = true end) end diff --git a/hh_aidoc[QB]/config.lua b/hh_aidoc[QB]/config.lua index 82d6bbd..a7ad8ee 100644 --- a/hh_aidoc[QB]/config.lua +++ b/hh_aidoc[QB]/config.lua @@ -4,6 +4,6 @@ Config = {} Config.Doctor = 0 -- Minimum Amount of EMS to work -Config.Price = 2000 -Config.ReviveTime = 20000 --in msec +Config.Price = 198.99 +Config.ReviveTime = 15000 --in msec