RegisterNetEvent('emsihbar')
AddEventHandler('emsihbar', function( source)
local src = source
if ESX.PlayerData.job and ESX.PlayerData.job.name == 'ambulance' then
local type = 'ems'
local data = {["code"] = '10-13', ["name"] = 'Yaralı Vatandaş', ["loc"] = 'Yaralı vatandaşın yardımına ihtiyacı var.'}
local length = 7500
SendNUIMessage({action = 'display', style = type, info = data, length = length})
PlaySound(-1, "Event_Start_Text", "GTAO_FM_Events_Soundset", 0, 0, 1)
TriggerEvent('abbisinyal:emswaypoint', src)
end
end)
RegisterNetEvent('abbisinyal:emswaypoint')
AddEventHandler('abbisinyal:emswaypoint', function(_targetCoords)
local targetCoords = _targetCoords
local emsBlip = AddBlipForCoord(targetCoords.x, targetCoords.y, targetCoords.z)
local alpha = 120
SetBlipSprite(emsBlip, 280)
SetBlipDisplay(emsBlip, 4)
SetBlipScale(emsBlip, 0.9)
SetBlipColour(emsBlip, 59)
SetBlipAsShortRange(emsBlip, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentString("Yaralı")
EndTextCommandSetBlipName(emsBlip)
SetNewWaypoint(targetCoords.x, targetCoords.y)
local emsBlip2 = AddBlipForRadius(targetCoords.x, targetCoords.y, targetCoords.z, 50.0)
SetBlipHighDetail(emsBlip2, true)
SetBlipColour(emsBlip2, 1)
SetBlipAlpha(emsBlip2, alpha)
SetBlipAsShortRange(emsBlip2, true)
Citizen.Wait(30000)
RemoveBlip(emsBlip2)
RemoveBlip(emsBlip)
end)
function StartDistressSignal()
Citizen.CreateThread(function()
local pressed = 0
local timer = Config.BleedoutTimer
while timer > 0 and isDead and pressed < 2 do
Citizen.Wait(0)
timer = timer - 30
SetTextFont(4)
SetTextScale(0.45, 0.45)
SetTextColour(185, 185, 185, 255)
SetTextDropshadow(0, 0, 0, 0, 255)
SetTextEdge(1, 0, 0, 0, 255)
SetTextDropShadow()
SetTextOutline()
SetTextCentre(true)
BeginTextCommandDisplayText('STRING')
AddTextComponentSubstringPlayerName('~w~[~r~G~w~] YE BASARAK SINYAL GÖNDER')
EndTextCommandDisplayText(0.501, 0.839)
if IsControlJustReleased(0, 47) then
SendDistressSignal()
pressed = pressed + 1
end
end
end)
end