diff --git a/client/cops.lua b/client/cops.lua deleted file mode 100644 index 6a7a36a..0000000 --- a/client/cops.lua +++ /dev/null @@ -1,29 +0,0 @@ -RegisterNetEvent('qbx_diving:client:addCrimeAlert', function(coords, msg) - PlaySound(-1, 'Lose_1st', 'GTAO_FM_Events_Soundset', false, 0, true) - TriggerEvent('chatMessage', Lang:t('error.911_chatmessage'), 'error', msg) - local transG = 100 - local blip = AddBlipForRadius(coords.x, coords.y, coords.z, 100.0) - SetBlipSprite(blip, 9) - SetBlipColour(blip, 1) - SetBlipAlpha(blip, transG) - SetBlipAsShortRange(blip, false) - BeginTextCommandSetBlipName('STRING') - AddTextComponentString(Lang:t('info.blip_text')) - EndTextCommandSetBlipName(blip) - - repeat - Wait(180 * 4) - transG -= 1 - SetBlipAlpha(blip, transG) - until transG == 0 - - SetBlipSprite(blip, 2) - RemoveBlip(blip) - - local alertData = { - title = Lang:t("info.cop_title"), - coords = coords, - description = msg - } - TriggerEvent("qb-phone:client:addPoliceAlert", alertData) -end) \ No newline at end of file diff --git a/config.lua b/config.lua index ecee7dc..7de38e5 100644 --- a/config.lua +++ b/config.lua @@ -1,6 +1,5 @@ Config = {} Config.UseTarget = GetConvar('UseTarget', 'false') == 'true' -- Use qb-target interactions (don't change this, go to your server.cfg and add `setr UseTarget true` to use this and just that from true to false or the other way around) -Config.CopsChance = 0.5 -- The chance of the cops getting called when a coral gets picked up, this ranges from 0.0 to 1.0 Config.Debug = false -- shows outline of box zones ---@class Coral diff --git a/locales/en.lua b/locales/en.lua index 00ba4ac..206ee17 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -1,7 +1,6 @@ local Translations = { error = { canceled = "Canceled", - ["911_chatmessage"] = "911 MESSAGE", no_coral = "You don't have any coral to sell...", }, info = { @@ -12,9 +11,6 @@ local Translations = { checking_pockets = "Checking Inventory for Coral to Sell...", sell_coral = "Sell Coral", sell_coral_dt = "[E] - Sell Coral", - blip_text = "911 - Dive Site", - cop_msg = "This coral looks freshly stolen...", - cop_title = "Illegal Diving", }, } diff --git a/server/cops.lua b/server/cops.lua deleted file mode 100644 index 433dbfe..0000000 --- a/server/cops.lua +++ /dev/null @@ -1,9 +0,0 @@ -AddEventHandler('qbx_diving:server:coralTaken', function(coords) - if math.random() > Config.CopsChance then return end - for _, player in pairs(exports.qbx_core:GetQBPlayers()) do - if player.PlayerData.job.type == 'leo' and player.PlayerData.job.onduty then - local msg = Lang:t("info.cop_msg") - TriggerClientEvent('qbx_diving:client:addCrimeAlert', player.PlayerData.source, coords, msg) - end - end -end) \ No newline at end of file