1
0
Fork 0
forked from Simnation/Main

Update function.lua

This commit is contained in:
Miho931 2025-07-02 21:00:45 +02:00
parent 5c05731d0e
commit d8f0117f9a

View file

@ -23,7 +23,7 @@ function spawnDoctor(coords, heading)
local ped = CreatePed(0, Config.DoctorModel, coords.x, coords.y, coords.z, heading or 0.0, true, true) local ped = CreatePed(0, Config.DoctorModel, coords.x, coords.y, coords.z, heading or 0.0, true, true)
SetEntityAsMissionEntity(ped, true, true) SetEntityAsMissionEntity(ped, true, true)
SetBlockingOfNonTemporaryEvents(ped, true) SetBlockingOfNonTemporaryEvents(ped, true)
SetEntityInvincible(ped, true) -- Unsterblich (kein Schaden möglich) SetEntityInvincible(ped, true) -- Unsterblich (kein Schaden möglich)
SetEntityCanBeDamaged(ped, false) -- Kein Schaden erleiden SetEntityCanBeDamaged(ped, false) -- Kein Schaden erleiden
SetPlayerCanTargetEntity(ped, false) -- Kann nicht angegriffen werden SetPlayerCanTargetEntity(ped, false) -- Kann nicht angegriffen werden
@ -89,11 +89,11 @@ function HealPlayerWithARE(ped)
end end
function IsAnyMedicOnDuty() function IsAnyMedicOnDuty()
local players = QBCore.Functions.GetQBPlayers() local Players, Amount = QBCore.Functions.GetPlayersOnDuty('ambulance')
for _, player in pairs(players) do
if player.PlayerData.job.name == 'ambulance' and player.PlayerData.job.onduty then if Amount > 0 then
return true return true
end else
return false
end end
return false
end end