-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
44 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"Lua.diagnostics.globals": [ | ||
"cache", | ||
"lib" | ||
"lib", | ||
"QBX" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters