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)
|
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
|
Loading…
Add table
Add a link
Reference in a new issue