forked from Simnation/Main
Dr. Teddy Update
This commit is contained in:
parent
68e87abdff
commit
7835e64711
2 changed files with 17 additions and 1 deletions
|
@ -15,7 +15,13 @@ CreateThread(function()
|
|||
--show3DText(pos, "[E] Hilfe anfordern")
|
||||
DrawText3D(pos.x, pos.y, pos.z, "[E] Hilfe anfordern")
|
||||
if IsControlJustPressed(0, 38) then
|
||||
local doc = IsAnyMedicOnDuty()
|
||||
Wait(100)
|
||||
if doc then
|
||||
TriggerServerEvent("drteddy:requestDoctor")
|
||||
else
|
||||
Notify("Dr. Teddy", "Dr. Teddy ist grade nicht im Dienst, ruf den Notdienst", "inform")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -79,3 +79,13 @@ function HealPlayerWithARE(ped)
|
|||
ClearTimecycleModifier()
|
||||
ClearExtraTimecycleModifier()
|
||||
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
|
||||
end
|
||||
return false
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue