Citizen.CreateThread(function() while true do local ped = PlayerPedId() local player = PlayerId() local isInVehicle = IsPedInAnyVehicle(ped, false) if isInVehicle then local viewMode = GetFollowVehicleCamViewMode() if viewMode == 1 or viewMode == 2 then SetFollowVehicleCamViewMode(4) end else local viewMode = GetFollowPedCamViewMode() if viewMode == 1 or viewMode == 2 then SetFollowPedCamViewMode(4) end end Citizen.Wait(0) end end) Citizen.CreateThread(function() while true do local playerCoords = GetEntityCoords(PlayerPedId()) local sleep = 5000 for _, area in ipairs(Config.ClearAreas) do local dist = #(playerCoords - area.coords) if dist < area.radius + 50.0 then ClearAreaOfPeds(area.coords.x, area.coords.y, area.coords.z, area.radius, 1) sleep = 500 end end Citizen.Wait(sleep) end end) Citizen.CreateThread(function() while true do local sleep = 1000 if exports.wasabi_police:IsHandcuffed() then if exports['prism_radio']:isRadioOpen() then exports['prism_radio']:closeRadio() end exports['prism_radio']:disconnectRadio() sleep = 300 end Citizen.Wait(sleep) end end) CreateThread(function() while true do local sleep = 1500 local isCuffed = exports.wasabi_police:IsHandcuffed() if isCuffed then sleep = 500 exports['av_laptop']:hideLaptop() TriggerEvent('av_laptop:close') end Wait(sleep) end end) CreateThread(function() while true do local sleep = 1500 if exports.wasabi_police:IsHandcuffed() then sleep = 500 TriggerEvent('redutzu-ems:client:closeEMS') end Wait(sleep) end end) AddEventHandler('redutzu-ems:client:openEMS', function() if exports.wasabi_police:IsHandcuffed() then TriggerEvent('redutzu-ems:client:closeEMS') end end) exports['qtarget']:AddBoxZone("sodišče", vector3(-576.1, -209.81, 37.77), 0.2, 0.2, { name="sodišče", heading=309.7652, debugPoly=false, minZ=36.67, maxZ=38.67, }, { options = {{ event = "sodisce:kladivo", icon = "fa-solid fa-gavel", label = "Kladivo", job = "ambulance", }}, distance = 3 }) exports['qtarget']:AddBoxZone("operacija", vector3(-337.88, -583.69, 37.34), 1, 1, { name="operacija", heading=210.9293, debugPoly=false, minZ=30.67, maxZ=32.67, }, { options = {{ event = "bolnica:pregled", icon = "fa-solid fa-user-injured", label = "Začni z Operacijo", job = "ambulance", }}, distance = 3 }) exports['qtarget']:AddBoxZone("operacija2", vector3(-326.83, -573.88, 37.34), 1.0, 1.0, { name="operacija2", heading=320.7652, debugPoly=false, minZ=32.13, maxZ=34.13, }, { options = {{ event = "bolnica:pregled", icon = "fa-solid fa-user-injured", label = "Začni z Operacijo", job = "ambulance", }}, distance = 3 }) exports['qtarget']:AddBoxZone("bolnica", vector3(-325.56, -575.77, 37.34), 0.6, 0.8, { name="bolnica", heading=309.7652, debugPoly=false, minZ=42.67, maxZ=44.67, }, { options = {{ event = "bolnica:operaciska", icon = "fa-solid fa-desktop", label = "Monitor", job = "ambulance", }}, distance = 3 }) exports['qtarget']:AddBoxZone("bolnica2", vector3(-339.1, -581.69, 37.34), 1.0, 1.0, { name="bolnica2", heading=309.7652, debugPoly=false, minZ=32.17, maxZ=34.15, }, { options = {{ event = "bolnica:operaciska", icon = "fa-solid fa-desktop", label = "Monitor", job = "ambulance", }}, distance = 3 }) exports['qtarget']:AddBoxZone("slikanje", vector3(-317.22, -570.02, 37.34), 1, 1, { name="slikanje", heading=0, debugPoly=false, minZ=42.06, maxZ=44.06, }, { options = {{ event = "bolnica:slikanje", icon = "fa-solid fa-camera-retro", label = "Slikanje", job = "ambulance", }}, distance = 3 }) exports['qtarget']:AddBoxZone("urin", vector3(-349.4, -594.05, 37.34), 1.0, 1.0, { name="urin", heading=309.7652, debugPoly=false, minZ=41.67, maxZ=43.67, }, { options = {{ event = "bolnica:urin", icon = "fa-solid fa-vials", label = "Daj Urin", }}, distance = 3 }) exports['qtarget']:AddBoxZone("kri", vector3(-297.36, -570.16, 36.34), 1.0, 1.0, { name="kri", heading=309.7652, debugPoly=false, minZ=41.67, maxZ=43.67, }, { options = {{ event = "bolnica:kri", icon = "fa-solid fa-vials", label = "Vzemi Kri", job = "ambulance", }}, distance = 3 }) exports['qtarget']:AddBoxZone("urinlab", vector3(300.20, -581.15, 28.75), 1.0, 1.0, { name="urinlab", heading=309.7652, debugPoly=false, minZ=27.67, maxZ=29.67, }, { options = {{ event = "bolnica:krilab", icon = "fa-solid fa-vials", label = "Laboratorji", job = "ambulance", }}, distance = 3 }) exports['qtarget']:AddBoxZone("lspd_slikanje", vector3(454.54, -980.04, 26.51), 1.0, 1.0, { name="lspd_slikanje", heading=309.7652, debugPoly=false, minZ=25.51, maxZ=27.51, }, { options = {{ event = "lspd:slikanje", icon = "fa-solid fa-camera-retro", label = "Slikaj", job = "police", }}, distance = 3 }) -- Events AddEventHandler('sodisce:kladivo', function() TriggerServerEvent('InteractSound_SV:PlayWithinDistance', 20.5, 'KLADIVO', 0.3) end) AddEventHandler('bolnica:pregled', function() local status = exports['prism_uipack']:ProgressBar({ label = "Pregled Pacienta", duration = 25000, position = 'bottom-center', canCancel = false, anim = { scenario = "CODE_HUMAN_MEDIC_TIME_OF_DEATH" }, disable = { move = true, car = true, combat = true, mouse = false, sprint = true }, }) if status then exports['prism_uipack']:Notify({ title = "EMS", description = "Pregled uspešen. Pričetek operacije.", duration = 5000, type = "error", icon = "user-injured" }) TriggerEvent('bolnica:operacija') end end) AddEventHandler('bolnica:operacija', function() local status = exports['prism_uipack']:ProgressBar({ label = "Operacija", duration = 80000, position = 'bottom-center', canCancel = false, anim = { dict = "anim@scripted@heist@ig9_control_tower@male@", clip = "loop", blendIn = 3.0, blendOut = 3.0, flag = 1 }, prop = { { model = "prop_scalpel", bone = 18905, pos = {x = 0.1, y = 0.02, z = 0.04}, rot = {x = 100.0, y = 90.0, z = -92.0} } }, disable = { move = true, car = true, combat = true, mouse = false, sprint = true }, }) if status then exports['prism_uipack']:Notify({ title = "EMS", description = "Operacija uspešna. Oskrba rane...", duration = 5000, type = "error", icon = "syringe" }) TriggerEvent('bolnica:povoj') end end) AddEventHandler('bolnica:povoj', function() local status = exports['prism_uipack']:ProgressBar({ label = "Oskrba Rane", duration = 30000, position = 'bottom-center', canCancel = false, anim = { dict = "mp_prison_break", clip = "hack_loop", blendIn = 3.0, blendOut = 3.0, flag = 1 }, prop = { { model = "bzzz_medicalprops_bandage_d", bone = 18905, pos = {x = 0.2, y = 0.1, z = 0.0}, rot = {x = 0.0, y = 0.0, z = 0.0} } }, disable = { move = true, car = true, combat = true, mouse = false, sprint = true }, }) if status then TriggerEvent('bolnica:krema') end end) AddEventHandler('bolnica:krema', function() local status = exports['prism_uipack']:ProgressBar({ label = "Nanos Kreme", duration = 30000, position = 'bottom-center', canCancel = false, anim = { dict = "missheist_agency3aig_23", clip = "urinal_sink_loop", blendIn = 3.0, blendOut = 3.0, flag = 1 }, disable = { move = true, car = true, combat = true, mouse = false, sprint = true }, }) if status then exports['prism_uipack']:Notify({ title = "EMS", description = "Operacija uspešna!", duration = 5000, type = "error", icon = "hands-clapping" }) end end) AddEventHandler('bolnica:operaciska', function() local status = exports['prism_uipack']:ProgressBar({ label = "Priprava Monitorja", duration = 20000, position = 'bottom-center', canCancel = false, anim = { scenario = "PROP_HUMAN_ATM" }, disable = { move = true, car = true, combat = true, mouse = false, sprint = true }, }) if status then TriggerServerEvent('InteractSound_SV:PlayWithinDistance', 10.5, 'ems', 0.1) end end) AddEventHandler('bolnica:slikanje', function() ExecuteCommand("e type") Wait(4000) ExecuteCommand("e c") ExecuteCommand("e checkcar2") for i=20, 100, 20 do Wait(7000) ExecuteCommand("me " .. i .. "%") end Wait(5000) TriggerServerEvent('InteractSound_SV:PlayWithinDistance', 20.5, 'printer', 0.1) Wait(20000) ExecuteCommand("e c") ExecuteCommand("e clipboard") end) AddEventHandler('bolnica:urin', function() ExecuteCommand("e pee") Wait(10000) ExecuteCommand("e c") TriggerServerEvent("ems:urin") end) AddEventHandler('bolnica:kri', function() local status = exports['prism_uipack']:ProgressBar({ label = "Priprava Inekcije", duration = 10000, position = 'bottom-center', canCancel = false, anim = { dict = "rcmpaparazzo1ig_4", clip = "miranda_shooting_up", blendIn = 3.0, blendOut = 3.0, flag = 16 }, prop = { { model = "prop_syringe_01", bone = 18905, pos = {x = 0.12, y = 0.03, z = 0.03}, rot = {x = 143.0, y = 30.0, z = 0.0} } }, disable = { move = true, car = true, combat = true, mouse = false, sprint = true }, }) if status then TriggerEvent('vzem:krvi') end end) AddEventHandler('vzem:krvi', function() local status = exports['prism_uipack']:ProgressBar({ label = "Vzem Krvi", duration = 10000, position = 'bottom-center', canCancel = false, anim = { dict = "anim@scripted@heist@ig9_control_tower@male@", clip = "loop", blendIn = 3.0, blendOut = 3.0, flag = 1 }, prop = { { model = "prop_syringe_01", bone = 18905, pos = {x = 0.12, y = 0.03, z = 0.03}, rot = {x = 143.0, y = 30.0, z = 0.0} } }, disable = { move = true, car = true, combat = true, mouse = false, sprint = true }, }) if status then TriggerServerEvent("ems:kri") end end) AddEventHandler('bolnica:krilab', function() local status = exports["prism_uipack"]:ProgressBar({ label = "Test", duration = 10000, canCancel = false, disable = { move = true, car = true, combat = true, mouse = false, sprint = true }, scenario = { name = "PROP_HUMAN_PARKING_METER", enterAnim = true } }) if status then TriggerServerEvent("ems:krilab") end end) AddEventHandler('lspd:slikanje', function() ExecuteCommand("e camera2") Wait(10000) ExecuteCommand("e c") TriggerServerEvent("lspd:finish") end) RegisterNetEvent('wasabi_ambulance:Client:distressSignal', function(dispatchData) local data = exports['cd_dispatch']:GetPlayerInfo() TriggerServerEvent('cd_dispatch:AddNotification', { job_table = {'ambulance'}, coords = dispatchData.coords, title = '10-52 - Potrebna medicinska pomoč', message = 'Nekdo potrebuje vašo pomoč na ' .. dispatchData.streetName, flash = 0, unique_id = data.unique_id, sound = 1, blip = { sprite = 153, scale = 1.2, colour = 1, flashes = true, text = 'Nujna medicinska pomoč', time = 5, radius = 0, } }) end)