forked from Simnation/Main
Update function.lua
This commit is contained in:
parent
5c05731d0e
commit
d8f0117f9a
1 changed files with 7 additions and 7 deletions
|
@ -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)
|
||||
SetEntityAsMissionEntity(ped, true, true)
|
||||
SetBlockingOfNonTemporaryEvents(ped, true)
|
||||
|
||||
|
||||
SetEntityInvincible(ped, true) -- Unsterblich (kein Schaden möglich)
|
||||
SetEntityCanBeDamaged(ped, false) -- Kein Schaden erleiden
|
||||
SetPlayerCanTargetEntity(ped, false) -- Kann nicht angegriffen werden
|
||||
|
@ -89,11 +89,11 @@ function HealPlayerWithARE(ped)
|
|||
end
|
||||
|
||||
function IsAnyMedicOnDuty()
|
||||
local players = QBCore.Functions.GetQBPlayers()
|
||||
for _, player in pairs(players) do
|
||||
if player.PlayerData.job.name == 'ambulance' and player.PlayerData.job.onduty then
|
||||
return true
|
||||
end
|
||||
local Players, Amount = QBCore.Functions.GetPlayersOnDuty('ambulance')
|
||||
|
||||
if Amount > 0 then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
return false
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue