Skip to content

Commit

Permalink
Notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
GhzGarage committed Apr 4, 2022
1 parent c3d219a commit 05ebe1d
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 61 deletions.
10 changes: 5 additions & 5 deletions client/evidence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ RegisterNetEvent('evidence:client:SetStatus', function(statusId, time)
text = StatusList[statusId],
time = time
}
exports['qbr-core']:Notify(CurrentStatusList[statusId].text, 'error')
exports['qbr-core']:Notify(9, CurrentStatusList[statusId].text, 2000, 0, 'mp_lobby_textures', 'cross')
end
elseif StatusList[statusId] then
CurrentStatusList[statusId] = nil
Expand Down Expand Up @@ -141,10 +141,10 @@ RegisterNetEvent('evidence:client:ClearBlooddropsInArea', function()
end
end
TriggerServerEvent('evidence:server:ClearBlooddrops', blooddropList)
exports['qbr-core']:Notify(Lang:t("success.blood_clear"), "success")
exports['qbr-core']:Notify(9, Lang:t("success.blood_clear"), 2000, 0, 'hud_textures', 'check')
end
end, function() -- Cancel
exports['qbr-core']:Notify(Lang:t("error.blood_not_cleared"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.blood_not_cleared"), 2000, 0, 'mp_lobby_textures', 'cross')
end)
end)

Expand Down Expand Up @@ -182,11 +182,11 @@ RegisterNetEvent('evidence:client:ClearCasingsInArea', function()
end
end
TriggerServerEvent('evidence:server:ClearCasings', casingList)
exports['qbr-core']:Notify(Lang:t("success.bullet_casing_removed"), "success")
exports['qbr-core']:Notify(9, Lang:t("success.bullet_casing_removed"), 2000, 0, 'hud_textures', 'check')

end
end, function() -- Cancel
exports['qbr-core']:Notify(Lang:t("error.bullet_casing_not_removed"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.bullet_casing_not_removed"), 2000, 0, 'mp_lobby_textures', 'cross')
end)
end)

Expand Down
44 changes: 22 additions & 22 deletions client/interactions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ RegisterNetEvent('police:client:SearchPlayer', function()
TriggerServerEvent("inventory:server:OpenInventory", "otherplayer", playerId)
TriggerServerEvent("police:server:SearchPlayer", playerId)
else
exports['qbr-core']:Notify(Lang:t("error.none_nearby"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.none_nearby"), 2000, 0, 'mp_lobby_textures', 'cross')
end
end)

Expand All @@ -69,7 +69,7 @@ RegisterNetEvent('police:client:SeizeCash', function()
local playerId = GetPlayerServerId(player)
TriggerServerEvent("police:server:SeizeCash", playerId)
else
exports['qbr-core']:Notify(Lang:t("error.none_nearby"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.none_nearby"), 2000, 0, 'mp_lobby_textures', 'cross')
end
end)

Expand All @@ -79,7 +79,7 @@ RegisterNetEvent('police:client:SeizeDriverLicense', function()
local playerId = GetPlayerServerId(player)
TriggerServerEvent("police:server:SeizeDriverLicense", playerId)
else
exports['qbr-core']:Notify(Lang:t("error.none_nearby"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.none_nearby"), 2000, 0, 'mp_lobby_textures', 'cross')
end
end)

Expand All @@ -104,14 +104,14 @@ RegisterNetEvent('police:client:RobPlayer', function()
TriggerServerEvent("inventory:server:OpenInventory", "otherplayer", playerId)
TriggerEvent("inventory:server:RobPlayer", playerId)
else
exports['qbr-core']:Notify(Lang:t("error.none_nearby"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.none_nearby"), 2000, 0, 'mp_lobby_textures', 'cross')
end
end, function() -- Cancel
exports['qbr-core']:Notify(Lang:t("error.canceled"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.canceled"), 2000, 0, 'mp_lobby_textures', 'cross')
end)
end
else
exports['qbr-core']:Notify(Lang:t("error.none_nearby"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.none_nearby"), 2000, 0, 'mp_lobby_textures', 'cross')
end
end)

Expand All @@ -131,10 +131,10 @@ RegisterNetEvent('police:client:JailPlayer', function()
if tonumber(dialogInput) > 0 then
TriggerServerEvent("police:server:JailPlayer", playerId, tonumber(dialogInput))
else
exports['qbr-core']:Notify(Lang:t("error.time_higher"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.time_higher"), 2000, 0, 'mp_lobby_textures', 'cross')
end
else
exports['qbr-core']:Notify(Lang:t("error.none_nearby"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.none_nearby"), 2000, 0, 'mp_lobby_textures', 'cross')
end
end)

Expand All @@ -146,10 +146,10 @@ RegisterNetEvent('police:client:BillPlayer', function()
if tonumber(dialogInput) > 0 then
TriggerServerEvent("police:server:BillPlayer", playerId, tonumber(dialogInput))
else
exports['qbr-core']:Notify(Lang:t("error.amount_higher"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.amount_higher"), 2000, 0, 'mp_lobby_textures', 'cross')
end
else
exports['qbr-core']:Notify(Lang:t("error.none_nearby"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.none_nearby"), 2000, 0, 'mp_lobby_textures', 'cross')
end
end)

Expand All @@ -161,7 +161,7 @@ RegisterNetEvent('police:client:PutPlayerInVehicle', function()
TriggerServerEvent("police:server:PutPlayerInVehicle", playerId)
end
else
exports['qbr-core']:Notify(Lang:t("error.none_nearby"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.none_nearby"), 2000, 0, 'mp_lobby_textures', 'cross')
end
end)

Expand All @@ -173,7 +173,7 @@ RegisterNetEvent('police:client:SetPlayerOutVehicle', function()
TriggerServerEvent("police:server:SetPlayerOutVehicle", playerId)
end
else
exports['qbr-core']:Notify(Lang:t("error.none_nearby"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.none_nearby"), 2000, 0, 'mp_lobby_textures', 'cross')
end
end)

Expand All @@ -185,7 +185,7 @@ RegisterNetEvent('police:client:EscortPlayer', function()
TriggerServerEvent("police:server:EscortPlayer", playerId)
end
else
exports['qbr-core']:Notify(Lang:t("error.none_nearby"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.none_nearby"), 2000, 0, 'mp_lobby_textures', 'cross')
end
end)

Expand All @@ -199,7 +199,7 @@ RegisterNetEvent('police:client:KidnapPlayer', function()
end
end
else
exports['qbr-core']:Notify(Lang:t("error.none_nearby"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.none_nearby"), 2000, 0, 'mp_lobby_textures', 'cross')
end
end)

Expand All @@ -212,10 +212,10 @@ RegisterNetEvent('police:client:CuffPlayerSoft', function()
TriggerServerEvent("police:server:CuffPlayer", playerId, true)
-- HandCuffAnimation()
else
exports['qbr-core']:Notify(Lang:t("error.vehicle_cuff"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.vehicle_cuff"), 2000, 0, 'mp_lobby_textures', 'cross')
end
else
exports['qbr-core']:Notify(Lang:t("error.none_nearby"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.none_nearby"), 2000, 0, 'mp_lobby_textures', 'cross')
end
else
Wait(2000)
Expand All @@ -233,14 +233,14 @@ RegisterNetEvent('police:client:CuffPlayer', function()
TriggerServerEvent("police:server:CuffPlayer", playerId, false)
-- HandCuffAnimation()
else
exports['qbr-core']:Notify(Lang:t("error.vehicle_cuff"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.vehicle_cuff"), 2000, 0, 'mp_lobby_textures', 'cross')
end
else
exports['qbr-core']:Notify(Lang:t("error.no_cuff"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.no_cuff"), 2000, 0, 'mp_lobby_textures', 'cross')
end
end, Config.HandCuffItem)
else
exports['qbr-core']:Notify(Lang:t("error.none_nearby"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.none_nearby"), 2000, 0, 'mp_lobby_textures', 'cross')
end
else
Wait(2000)
Expand Down Expand Up @@ -332,11 +332,11 @@ RegisterNetEvent('police:client:GetCuffed', function(playerId, isSoftcuff)
if not isSoftcuff then
cuffType = 16
-- GetCuffedAnimation(playerId)
exports['qbr-core']:Notify(Lang:t("info.cuff"), 'primary')
exports['qbr-core']:Notify(9, Lang:t("info.cuff"), 2000, 0, 'blips', 'blip_radius_search')
else
cuffType = 49
-- GetCuffedAnimation(playerId)
exports['qbr-core']:Notify(Lang:t("info.cuffed_walk"), 'primary')
exports['qbr-core']:Notify(9, Lang:t("info.cuffed_walk"), 2000, 0, 'blips', 'blip_radius_search')
end
else
isHandcuffed = false
Expand All @@ -353,7 +353,7 @@ RegisterNetEvent('police:client:GetCuffed', function(playerId, isSoftcuff)
FreezeEntityPosition(ped, false)
end
-- TriggerServerEvent("InteractSound_SV:PlayOnSource", "Uncuff", 0.2)
exports['qbr-core']:Notify(Lang:t("success.uncuffed"),"success")
exports['qbr-core']:Notify(9, Lang:t("success.uncuffed"),2000, 0, 'hud_textures', 'check')
end
end)

Expand Down
4 changes: 2 additions & 2 deletions client/job.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ RegisterNetEvent('police:client:CheckStatus', function()
exports['qbr-core']:TriggerCallback('police:GetPlayerStatus', function(result)
if result then
for k, v in pairs(result) do
exports['qbr-core']:Notify(''..v..'')
exports['qbr-core']:Notify(9, ''..v..'')
end
end
end, playerId)
else
exports['qbr-core']:Notify(Lang:t("error.none_nearby"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.none_nearby"), 2000, 0, 'mp_lobby_textures', 'cross')
end
end
end)
Expand Down
2 changes: 1 addition & 1 deletion client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ RegisterNetEvent('police:client:UpdateBlips', function(players)
end)

RegisterNetEvent('police:client:policeAlert', function(coords, text)
exports['qbr-core']:Notify({text = text, caption = street1name.. ' ' ..street2name}, 'police')
exports['qbr-core']:Notify(9, {text = text, caption = street1name.. ' ' ..street2name}, 'police')
local transG = 250

local blip = Citizen.InvokeNative(0x554D9D53F696D002, 1664425300, coords.x, coords.y, coords.z)
Expand Down
14 changes: 7 additions & 7 deletions client/objects.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ RegisterNetEvent('police:client:spawnCone', function()
TriggerServerEvent("police:server:spawnObject", "cone")
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "anim@narcotics@trash", "drop_front", 1.0)
exports['qbr-core']:Notify(Lang:t("error.canceled"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.canceled"), 2000, 0, 'mp_lobby_textures', 'cross')
end)
end)

Expand All @@ -92,7 +92,7 @@ RegisterNetEvent('police:client:spawnBarrier', function()
TriggerServerEvent("police:server:spawnObject", "barrier")
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "anim@narcotics@trash", "drop_front", 1.0)
exports['qbr-core']:Notify(Lang:t("error.canceled"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.canceled"), 2000, 0, 'mp_lobby_textures', 'cross')
end)
end)

Expand All @@ -111,7 +111,7 @@ RegisterNetEvent('police:client:spawnRoadSign', function()
TriggerServerEvent("police:server:spawnObject", "roadsign")
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "anim@narcotics@trash", "drop_front", 1.0)
exports['qbr-core']:Notify(Lang:t("error.canceled"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.canceled"), 2000, 0, 'mp_lobby_textures', 'cross')
end)
end)

Expand All @@ -130,7 +130,7 @@ RegisterNetEvent('police:client:spawnTent', function()
TriggerServerEvent("police:server:spawnObject", "tent")
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "anim@narcotics@trash", "drop_front", 1.0)
exports['qbr-core']:Notify(Lang:t("error.canceled"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.canceled"), 2000, 0, 'mp_lobby_textures', 'cross')
end)
end)

Expand All @@ -149,7 +149,7 @@ RegisterNetEvent('police:client:spawnLight', function()
TriggerServerEvent("police:server:spawnObject", "light")
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "anim@narcotics@trash", "drop_front", 1.0)
exports['qbr-core']:Notify(Lang:t("error.canceled"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.canceled"), 2000, 0, 'mp_lobby_textures', 'cross')
end)
end)

Expand All @@ -170,7 +170,7 @@ RegisterNetEvent('police:client:deleteObject', function()
TriggerServerEvent("police:server:deleteObject", objectId)
end, function() -- Cancel
StopAnimTask(PlayerPedId(), "weapons@first_person@aim_rng@generic@projectile@thermal_charge@", "plant_floor", 1.0)
exports['qbr-core']:Notify(Lang:t("error.canceled"), "error")
exports['qbr-core']:Notify(9, Lang:t("error.canceled"), 2000, 0, 'mp_lobby_textures', 'cross')
end)
end
end)
Expand Down Expand Up @@ -215,7 +215,7 @@ RegisterNetEvent('police:client:SpawnSpikeStrip', function()
TriggerServerEvent('police:server:SyncSpikes', SpawnedSpikes)
end
else
exports['qbr-core']:Notify(Lang:t("error.no_spikestripe"), 'error')
exports['qbr-core']:Notify(9, Lang:t("error.no_spikestripe"), 2000, 0, 'mp_lobby_textures', 'cross')
end
end)

Expand Down
Loading

0 comments on commit 05ebe1d

Please sign in to comment.