local QBCore = exports['qb-core']:GetCoreObject() local notifActive = true local soundActive = true local alertOn = false local alertX = nil local alertY = nil local lastAlertId = nil local PlayerData = { job = { name = "unemployed" } } local toggleOld = false local gpsName = "" local myFramework = nil if framework == "esx" then Citizen.CreateThread(function() while myFramework == nil do TriggerEvent('esx:getSharedObject', function(obj) myFramework = obj end) Citizen.Wait(0) end while myFramework.GetPlayerData().job == nil do Citizen.Wait(100) end PlayerData = myFramework.GetPlayerData() end) elseif framework == "qb" then Citizen.CreateThread(function() myFramework = exports['qb-core']:GetCoreObject() while myFramework.Functions.GetPlayerData().job == nil do Citizen.Wait(100) end PlayerData = myFramework.Functions.GetPlayerData() end) end RegisterNetEvent('QBCore:Client:OnJobUpdate', function(JobInfo) PlayerData.job = JobInfo end) RegisterNetEvent('QBCore:Client:SetDuty', function(duty) PlayerData.job.onduty = duty end) local colors = { ['0'] = "Metallic Black", ['1'] = "Metallic Graphite Black", ['2'] = "Metallic Black Steal", ['3'] = "Metallic Dark Silver", ['4'] = "Metallic Silver", ['5'] = "Metallic Blue Silver", ['6'] = "Metallic Steel Gray", ['7'] = "Metallic Shadow Silver", ['8'] = "Metallic Stone Silver", ['9'] = "Metallic Midnight Silver", ['10'] = "Metallic Gun Metal", ['11'] = "Metallic Anthracite Grey", ['12'] = "Matte Black", ['13'] = "Matte Gray", ['14'] = "Matte Light Grey", ['15'] = "Util Black", ['16'] = "Util Black Poly", ['17'] = "Util Dark silver", ['18'] = "Util Silver", ['19'] = "Util Gun Metal", ['20'] = "Util Shadow Silver", ['21'] = "Worn Black", ['22'] = "Worn Graphite", ['23'] = "Worn Silver Grey", ['24'] = "Worn Silver", ['25'] = "Worn Blue Silver", ['26'] = "Worn Shadow Silver", ['27'] = "Metallic Red", ['28'] = "Metallic Torino Red", ['29'] = "Metallic Formula Red", ['30'] = "Metallic Blaze Red", ['31'] = "Metallic Graceful Red", ['32'] = "Metallic Garnet Red", ['33'] = "Metallic Desert Red", ['34'] = "Metallic Cabernet Red", ['35'] = "Metallic Candy Red", ['36'] = "Metallic Sunrise Orange", ['37'] = "Metallic Classic Gold", ['38'] = "Metallic Orange", ['39'] = "Matte Red", ['40'] = "Matte Dark Red", ['41'] = "Matte Orange", ['42'] = "Matte Yellow", ['43'] = "Util Red", ['44'] = "Util Bright Red", ['45'] = "Util Garnet Red", ['46'] = "Worn Red", ['47'] = "Worn Golden Red", ['48'] = "Worn Dark Red", ['49'] = "Metallic Dark Green", ['50'] = "Metallic Racing Green", ['51'] = "Metallic Sea Green", ['52'] = "Metallic Olive Green", ['53'] = "Metallic Green", ['54'] = "Metallic Gasoline Blue Green", ['55'] = "Matte Lime Green", ['56'] = "Util Dark Green", ['57'] = "Util Green", ['58'] = "Worn Dark Green", ['59'] = "Worn Green", ['60'] = "Worn Sea Wash", ['61'] = "Metallic Midnight Blue", ['62'] = "Metallic Dark Blue", ['63'] = "Metallic Saxony Blue", ['64'] = "Metallic Blue", ['65'] = "Metallic Mariner Blue", ['66'] = "Metallic Harbor Blue", ['67'] = "Metallic Diamond Blue", ['68'] = "Metallic Surf Blue", ['69'] = "Metallic Nautical Blue", ['70'] = "Metallic Bright Blue", ['71'] = "Metallic Purple Blue", ['72'] = "Metallic Spinnaker Blue", ['73'] = "Metallic Ultra Blue", ['74'] = "Metallic Bright Blue", ['75'] = "Util Dark Blue", ['76'] = "Util Midnight Blue", ['77'] = "Util Blue", ['78'] = "Util Sea Foam Blue", ['79'] = "Uil Lightning blue", ['80'] = "Util Maui Blue Poly", ['81'] = "Util Bright Blue", ['82'] = "Matte Dark Blue", ['83'] = "Matte Blue", ['84'] = "Matte Midnight Blue", ['85'] = "Worn Dark blue", ['86'] = "Worn Blue", ['87'] = "Worn Light blue", ['88'] = "Metallic Taxi Yellow", ['89'] = "Metallic Race Yellow", ['90'] = "Metallic Bronze", ['91'] = "Metallic Yellow Bird", ['92'] = "Metallic Lime", ['93'] = "Metallic Champagne", ['94'] = "Metallic Pueblo Beige", ['95'] = "Metallic Dark Ivory", ['96'] = "Metallic Choco Brown", ['97'] = "Metallic Golden Brown", ['98'] = "Metallic Light Brown", ['99'] = "Metallic Straw Beige", ['100'] = "Metallic Moss Brown", ['101'] = "Metallic Biston Brown", ['102'] = "Metallic Beechwood", ['103'] = "Metallic Dark Beechwood", ['104'] = "Metallic Choco Orange", ['105'] = "Metallic Beach Sand", ['106'] = "Metallic Sun Bleeched Sand", ['107'] = "Metallic Cream", ['108'] = "Util Brown", ['109'] = "Util Medium Brown", ['110'] = "Util Light Brown", ['111'] = "Metallic White", ['112'] = "Metallic Frost White", ['113'] = "Worn Honey Beige", ['114'] = "Worn Brown", ['115'] = "Worn Dark Brown", ['116'] = "Worn straw beige", ['117'] = "Brushed Steel", ['118'] = "Brushed Black steel", ['119'] = "Brushed Aluminium", ['120'] = "Chrome", ['121'] = "Worn Off White", ['122'] = "Util Off White", ['123'] = "Worn Orange", ['124'] = "Worn Light Orange", ['125'] = "Metallic Securicor Green", ['126'] = "Worn Taxi Yellow", ['127'] = "police car blue", ['128'] = "Matte Green", ['129'] = "Matte Brown", ['130'] = "Worn Orange", ['131'] = "Matte White", ['132'] = "Worn White", ['133'] = "Worn Olive Army Green", ['134'] = "Pure White", ['135'] = "Hot Pink", ['136'] = "Salmon pink", ['137'] = "Metallic Vermillion Pink", ['138'] = "Orange", ['139'] = "Green", ['140'] = "Blue", ['141'] = "Mettalic Black Blue", ['142'] = "Metallic Black Purple", ['143'] = "Metallic Black Red", ['144'] = "hunter green", ['145'] = "Metallic Purple", ['146'] = "Metaillic V Dark Blue", ['147'] = "MODSHOP BLACK1", ['148'] = "Matte Purple", ['149'] = "Matte Dark Purple", ['150'] = "Metallic Lava Red", ['151'] = "Matte Forest Green", ['152'] = "Matte Olive Drab", ['153'] = "Matte Desert Brown", ['154'] = "Matte Desert Tan", ['155'] = "Matte Foilage Green", ['156'] = "DEFAULT ALLOY COLOR", ['157'] = "Epsilon Blue", } local WeaponTable = { [911657153] = "Taser", [453432689] = "CLASS 1(pistol)", --pistol [3219281620] = "CLASS 1", [`weapon_g19`] = "CLASS 1: Glock 19", [`weapon_g17`] = "CLASS 1: Glock 17", [`weapon_p226`] = "CLASS 1: Sig Sauer P226", [`weapon_dp9`] = "CLASS 1: Diamond DP9", [`weapon_browning`] = "CLASS 1: Browning", [`weapon_tolvector`] = "CLASS 2: Tolvector", [`weapon_microsmg2`] = "CLASS 2: Micro SMG", [`weapon_microsmg3`] = "CLASS 2: Micro SMG 2", [`weapon_assaultrifle2`] = "CLASS 3(AssaultRifle 2)", [1593441988] = "CLASS 1(pd pistol)", [-1716589765] = "CLASS 1(Pistol50)", [-1076751822] = "CLASS 1(SNSPistol)", [-771403250] = "CLASS 1", --heavy [137902532] = "CLASS 1(VintagePistol)", [-598887786] = "CLASS 1", [-1045183535] = "CLASS 1", [584646201] = "CLASS 2", --ap [324215364] = "CLASS 2", [-619010992] = "CLASS 2", [736523883] = "CLASS 2(pd smg)", [2024373456] = "CLASS 2", [-270015777] = "CLASS 2(AssaultSMG)", [171789620] = "CLASS 2", [-1121678507] = "CLASS 2", [487013001] = "CLASS 2", [2017895192] = "CLASS 2", [-1654528753] = "CLASS 2", [-494615257] = "CLASS 2", [984333226] = "CLASS 2", [-275439685] = "CLASS 2", [317205821] = "CLASS 2", [-1074790547] = "CLASS 3(AssaultRifle)", [961495388] = "CLASS 3(AssaultRiflemk2)", [-2084633992] = "CLASS 3(CarbineRifle)", [4208062921] = "CLASS 3(CarbineRiflemk2)", [-1357824103] = "CLASS 3(AdvancedRifle)", [-1063057011] = "CLASS 3(SpecialCarbine)", [2132975508] = "CLASS 3(BullpupRifle)", [1649403952] = "CLASS 3(CompactRifle)", [-1660422300] = "CLASS 3(MG)", [3686625920] = "CLASS 3", [1627465347] = "CLASS 3(gusenberg)", [100416529] = "CLASS 5(SniperRifle)", [205991906] = "CLASS 5(HeavySniper)", [177293209] = "CLASS 5", [-952879014] = "CLASS 5", [-1466123874] = "CLASS 5", [-1568386805] = "CLASS 6", [-1312131151] = "CLASS 6", [125959754] = "CLASS 6", --e sangirsin [GetHashKey('WEAPON_BROWNING')] = "CLASS 1(BROWNING)", [GetHashKey('weapon_glock')] = "CLASS 1(glock)", [GetHashKey('weapon_dp9')] = "CLASS 1(DP9)", [GetHashKey('weapon_nailgun')] = "CLASS 1(M4)", [GetHashKey('weapon_minismg2')] = "CLASS 2(M4)", [GetHashKey('weapon_assaultrifle2')] = "CLASS 3(assaultrifle2)", [GetHashKey('weapon_m4')] = "CLASS 3(PD m4)", [GetHashKey('weapon_sniperrifle2')] = "CLASS 5(sniperrifle2)", [GetHashKey('weapon_g22')] = "CLASS 5(g22)", [GetHashKey('weapon_m14')] = "CLASS 5(m14)", [GetHashKey('weapon_dragunov')] = "CLASS 5(M4)", [GetHashKey('weapon_ltl')] = "CLASS 2(ltl)", [GetHashKey('weapon_specialcarbine_mk2')] = "CLASS 3(scarbinemk2)", } if testCommand then local test = 0 RegisterCommand("alertTest", function() test = test + 1 TriggerEvent("tgiann-policeAlert:alert", "Test Alert "..test, false) end) end if framework == "esx" then RegisterNetEvent('esx:playerLoaded') AddEventHandler('esx:playerLoaded', function() PlayerData = myFramework.GetPlayerData() end) RegisterNetEvent('esx:setJob') AddEventHandler('esx:setJob', function(job) PlayerData.job = job end) elseif framework == "qb" then RegisterNetEvent('QBCore:Client:OnPlayerLoaded') AddEventHandler('QBCore:Client:OnPlayerLoaded', function() PlayerData = myFramework.Functions.GetPlayerData() end) RegisterNetEvent('QBCore:Client:OnJobUpdate') AddEventHandler('QBCore:Client:OnJobUpdate', function(job) PlayerData.job = job end) else RegisterCommand("setjob", function(source, args) PlayerData.job = {} PlayerData.job.name = args[1] end) end RegisterCommand("setdispatchname", function(source, args) if args[1] then gpsName = table.concat(args, ' ') end end) RegisterNetEvent("tgiann-policeAlert:client:Normal") AddEventHandler("tgiann-policeAlert:client:Normal", function(alertId, alertName, street, sex, x, y, date) if checkJobs() then Citizen.Wait(100) mapblip(alertName, x, y) normal(alertId, alertName, street, sex, x, y, date) end end) RegisterNetEvent("tgiann-policeAlert:client:full") AddEventHandler("tgiann-policeAlert:client:full", function(alertId, alertName, street, arac, plate, renk, sex, x, y, date) if checkJobs() then Citizen.Wait(100) mapblip(alertName, x, y) full(alertId, alertName, street, arac, plate, renk, sex, x, y, date) end end) Citizen.CreateThread(function() RegisterKeyMapping('dispatch'..dispatchKey, 'Dispatch', 'keyboard', dispatchKey) RegisterKeyMapping('dispatchPressY'..dispatchHeadingKey, 'Dispatch [Heading to The Police Call]', 'keyboard', dispatchHeadingKey) RegisterKeyMapping('dispatchPressE'..dispatchMarkKey, 'Dispatch [Mark On Map]', 'keyboard', dispatchMarkKey) end) RegisterCommand('dispatch'..dispatchKey, function() if not toggleOld then if checkJobs() then toggleOld = true SendNUIMessage({action = 'showOld'}) SetNuiFocus(true, true) Citizen.Wait(1000) end end end, false) local pressE = false local pressY = false RegisterCommand('dispatchPressY'..dispatchHeadingKey, function() if alertOn then if lastAlertId and pressY then TriggerServerEvent("tgiann-policeAlert:server:yonel", lastAlertId, gpsName) lastAlertId = nil pressY = false end end end, false) RegisterCommand('dispatchPressE'..dispatchMarkKey, function() if alertOn then if pressE then SetNewWaypoint(alertX, alertY) pressE = false alertX = nil alertY = nil showNotification("GPS'te Konum işaretlendi") end end end, false) RegisterNUICallback('setCoords', function(coords, cb) showNotification("GPS'te Konum işaretlendi") SetNewWaypoint(coords.x, coords.y) end) RegisterNUICallback('yonel', function(data, cb) TriggerServerEvent("tgiann-policeAlert:server:yonel", data.alertId, gpsName) end) RegisterNetEvent('tgiann-policeAlert:client:yonel') AddEventHandler('tgiann-policeAlert:client:yonel', function(alertId, name) if checkJobs() then SendNUIMessage({ action = "yonel", alertId = alertId, name = name }) end end) RegisterNetEvent('tgiann-policeAlert:setGpsName') AddEventHandler('tgiann-policeAlert:setGpsName', function(newGpsName) gpsName = newGpsName end) RegisterNUICallback('closeui', function() toggleOld = false SetNuiFocus(false, false) TriggerEvent("tgiann-hud:big-map", false) end) function normal(alertId, alertName, street, sex, x, y, date) if soundActive then PlaySoundFrontend(-1, "Lose_1st", "GTAO_FM_Events_Soundset", false) end SendNUIMessage({ action = 'normal', alertName = alertName, street = street, arac = "yok", plate = "yok", renk = "yok", sex = sex, coords = {x, y}, date = date, alertId = alertId, yonel = false, }) timeReset(x, y, alertId) end function full(alertId, alertName, street, arac, plate, renk, sex, x, y, date) if soundActive then PlaySoundFrontend(-1, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET", false) end SendNUIMessage({ action = 'normal', alertName = alertName, street = street, arac = arac, plate = plate, renk = renk, sex = sex, coords = {x, y}, date = date, alertId = alertId, yonel = false, }) timeReset(x, y, alertId) end function timeReset(x, y, alertId) if soundActive then PlaySoundFrontend(-1, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0) end alertOn = true pressE = true pressY = true alertX = x alertY = y lastAlertId = alertId Citizen.Wait(10000) if alertOn then alertOn = false end end function mapblip(alertName, x, y) if alertName == "Silah Sesi Şüphesi" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 433, alertName) elseif alertName == "Yaralı Kişi" or alertName == "Polis "..PlayerData.charinfo.firstname .. " " .. PlayerData.charinfo.lastname .." Yardım İstiyor Kod / 1" or alertName == "Polis "..PlayerData.charinfo.firstname .. " " .. PlayerData.charinfo.lastname .." Yardım İstiyor Kod / 2" or alertName == "Polis "..PlayerData.charinfo.firstname .. " " .. PlayerData.charinfo.lastname .." Yardım İstiyor Kod / 3" or alertName == "Polis "..PlayerData.charinfo.firstname .. " " .. PlayerData.charinfo.lastname .." Yardım İstiyor Kod / 99" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 274, alertName) elseif alertName == "Qatar Soygunu" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 108, alertName) elseif alertName == "Hapishaneden Kaçış" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 237, alertName) elseif alertName == "Ev Soygunu Şüphesi" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 40, alertName) elseif alertName == "Market Soygunu" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 255, alertName) elseif alertName == "ATM Soygunu" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 255, alertName) elseif alertName == "Zerger Soyğunu" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 207, alertName) elseif alertName == "Yazarkasa Soygunu" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 108, alertName) elseif alertName == "[308] Vezne Soygunu" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 108, alertName) elseif alertName == "Banka soyğunu" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 108, alertName) elseif alertName == "Çalıntı Devlet Aracı" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 56, alertName) elseif alertName == "Çalıntı Araç Şüphesi" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 225, alertName) elseif alertName == "Uyuşturucu Satış Şüphesi" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 66, alertName) elseif alertName == "Meth bişirmə şübhəsi" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 66, alertName) elseif alertName == "Parkmetre Soygunu Şüphesi" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 66, alertName) elseif alertName == "Şüpheli Faaliyet (Meth vb.)" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 66, alertName) elseif alertName == "Araç Parçalama Şüphesi" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 56, alertName) elseif alertName == "Gun Fired" then TriggerEvent("tgiann-policeAlert:setBlip", x, y, 433, alertName) end end RegisterNetEvent('tgiann-policeAlert:setBlip') AddEventHandler('tgiann-policeAlert:setBlip', function(x, y, icon, alertName) local alpha = 200 local blip = AddBlipForCoord(x, y, 5.0) SetBlipSprite(blip, icon) SetBlipDisplay(blip, 2) SetBlipScale(blip, 1.10) SetBlipColour(blip, 75) SetBlipAsShortRange(blip, false) SetBlipAlpha(blip, alpha) BeginTextCommandSetBlipName("STRING") AddTextComponentString(alertName) EndTextCommandSetBlipName(blip) while alpha ~= 0 do Citizen.Wait(60 * 6) alpha = alpha - 1 SetBlipAlpha(blip, alpha) if alpha == 0 then RemoveBlip(blip) break end end end) RegisterNetEvent('tgiann-policeAlert:alert') AddEventHandler('tgiann-policeAlert:alert', function(alertName, plate, alertCoord, vehicle) if not notifActive then return end local vehActive = true if vehicle ~= nil then vehActive = vehicle end local hidePlate = false if plate ~= nil then hidePlate = plate end local playerPed = PlayerPedId() local padCoords = GetEntityCoords(playerPed) local alertCoord = vector3(padCoords.x, padCoords.y, padCoords.z) if alertCoord then alertCoord = vector3(alertCoord.x, alertCoord.y, alertCoord.z) end local var1, var2 = GetStreetNameAtCoord(alertCoord.x, alertCoord.y, alertCoord.z, Citizen.ResultAsInteger(), Citizen.ResultAsInteger()) local street = GetStreetNameFromHashKey(var1) local sokak2 = GetStreetNameFromHashKey(var2) if sokak2 ~= nil and sokak2 ~= '' then street = street .. ', ' .. sokak2 end -- local sex = "Female" -- if GetEntityModel(playerPed) == 1885233650 then sex = "Male" end local weaponSlec = GetSelectedPedWeapon(playerPed) local sex = WeaponTable[weaponSlec] or "Bilinmiyor" if IsPedInAnyVehicle(playerPed, false) and vehActive then local showPlate = math.random(1, 100) local vehicle = GetVehiclePedIsIn(playerPed) local color1 = colors[tostring(GetVehicleCustomPrimaryColour(vehicle))] or "Unknown" local color2 = colors[tostring(GetVehicleCustomSecondaryColour(vehicle))] or "Unknown" local plate = "Unknown" if showPlate < 50 and not hidePlate then plate = GetVehicleNumberPlateText(vehicle) end if color2 == color1 then colorName = color1 else colorName = color1 ..', '.. color2 end TriggerServerEvent("tgiann-policeAlert:server:full", alertName, street, GetDisplayNameFromVehicleModel(GetEntityModel(vehicle)), plate, colorName, sex, alertCoord.x, alertCoord.y) else TriggerServerEvent("tgiann-policeAlert:server:normal", alertName, street, sex, alertCoord.x, alertCoord.y) end end) local supps = { "COMPONENT_AT_PI_SUPP_02", "COMPONENT_AT_AR_SUPP_02", "COMPONENT_AT_PI_SUPP", "COMPONENT_AT_SR_SUPP" } CreateThread(function() while true do local time = 2000 local ped = PlayerPedId() if IsPedArmed(ped, 7) and not mahzenZoneActive then time = 1 if IsPedShooting(ped) then if math.random(1,2) == 1 then local weaponSlec = GetSelectedPedWeapon(ped) if weaponSlec ~= `WEAPON_SNOWBALL` then local isStungun = weaponSlec == `weapon_stungun` local isAvci = weaponSlec == `weapon_musket` if PlayerData.job == nil then PlayerData = QBCore.Functions.GetPlayerData() end local duty = false local police = false if PlayerData.job.name == "police" or PlayerData.job.name == "sheriff" or PlayerData.job.name == "dssd" or PlayerData.job.name == "sasp" then duty = PlayerData.job.onduty end if not police and not duty then if weaponSlec == `weapon_musket` then if not in_zone then end else if isStungun then if PlayerData.job.name ~= 'ambulance' then TriggerEvent("tgiann-policeAlert:alert", "Stinger S-200(Taser) Kullanımı", false) end else TriggerEvent("tgiann-policeAlert:alert", "Silah Sesi Şüphesi", false) end end Wait(2000) end end else Wait(2000) end end end Wait(time) end end) -- Citizen.CreateThread(function() -- while true do -- local time = 2000 -- local ped = PlayerPedId() -- if IsPedArmed(ped, 7) then -- time = 1 -- if IsPedShooting(ped) then -- myFramework.Functions.TriggerCallback("police:IsSilencedWeapon", function(retval) -- local weaponSlec = GetSelectedPedWeapon(ped) -- if weaponSlec ~= `WEAPON_ASSAULTRIFLE` then -- if not checkJobs() and not exports["fixstore-warzone"]:inZone() and not retval and math.random(1, 4) == 1 then -- local weapon = WeaponTable[weaponSlec] or "Bilinmiyor" -- if weaponSlec == `weapon_stungun` then -- TriggerEvent("tgiann-policeAlert:alert", "Stinger S-200(Taser)", false) -- else -- TriggerEvent("tgiann-policeAlert:alert", "Silah Ateşlendi", false) -- end -- Wait(3000) -- end -- end -- end, GetSelectedPedWeapon(ped)) -- end -- end -- Citizen.Wait(time) -- end -- end) local cooldown = {} -- Cooldown verilerini saklamak için bir tablo oluşturun RegisterCommand("code", function(source, args) local playerId = source if checkJobs() then local codeLvl = args[1] if not codeLvl then QBCore.Functions.Notify("Kod seviyesini belirtmelisiniz! Örneğin: 0, 1, 2, 3, 99", "error") else if not cooldown[playerId] or GetGameTimer() - cooldown[playerId] >= 10000 then local alertName = myFramework.Functions.GetPlayerData().charinfo.firstname .. " " .. myFramework.Functions.GetPlayerData().charinfo.lastname .. " | ".. gpsName.." Yardıma İhtiyacı Var Kod / "..codeLvl TriggerEvent("tgiann-policeAlert:alert", alertName, false, false, false) TriggerServerEvent("tgiann-policeAlert:server:codeAlert", codeLvl) --QBCore.Functions.Notify("Kod Gönderildi", "success") cooldown[playerId] = GetGameTimer() -- Cooldown başlangıç zamanını güncelle else local remainingCooldown = math.ceil((GetGameTimer() - cooldown[playerId] - 10000) / 1000) QBCore.Functions.Notify("Bu komutu tekrar kullanabilmek için " .. remainingCooldown .. " saniye beklemelisiniz.", "error") end end end end) function playCode(code99) if soundActive then PlaySoundFrontend(-1, "TIMER_STOP", "HUD_MINI_GAME_SOUNDSET", 1) end if code99 then Wait(900) if soundActive then PlaySoundFrontend(-1, "TIMER_STOP", "HUD_MINI_GAME_SOUNDSET", 1) end Wait(900) if soundActive then PlaySoundFrontend(-1, "TIMER_STOP", "HUD_MINI_GAME_SOUNDSET", 1) end end end RegisterNetEvent('tgiann-policeAlert:client:codeAlert') AddEventHandler('tgiann-policeAlert:client:codeAlert', function(codeLvl) if checkJobs() then if codeLvl == "99" or codeLvl == "0" then playCode(true) else playCode(false) end end end) RegisterNetEvent('tgiann-policeAlert:active') AddEventHandler('tgiann-policeAlert:active', function(status) notifActive = status end) function showNotification(msg) BeginTextCommandThefeedPost('STRING') AddTextComponentSubstringPlayerName(msg) EndTextCommandThefeedPostTicker(0,1) end function checkJobs() local returnVal = false for i=1, #jobs do if PlayerData.job and PlayerData.job.name == jobs[i] or PlayerData.job.type == "leo" then if not PlayerData.job.onduty then return end returnVal = true break end end return returnVal end RegisterNUICallback("setSoundEffects", function() soundActive = not soundActive if soundActive == false then myFramework.Functions.Notify("Polis bildirim ses efektleri kapatıldı!", "error") else myFramework.Functions.Notify("Polis bildirim ses efektleri açıldı!", "success") end end)