Skip to content

Commit

Permalink
Update Notify
Browse files Browse the repository at this point in the history
Notify
  • Loading branch information
Andyauk authored May 30, 2023
1 parent 58c1ec9 commit f9827a2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ RegisterNetEvent('police:server:BillPlayer', function(playerId, price)
if OtherPlayer then
OtherPlayer.Functions.RemoveMoney("bank", price, "paid-bills")
TriggerEvent('qb-bossmenu:server:addAccountMoney', "police", price)
TriggerClientEvent('QBCore:Notify', OtherPlayer.PlayerData.source, Lang:t("info.fine_received", {fine = price}), 5000, 0, 'blips', 'blip_radius_search', 'COLOR_WHITE')
TriggerClientEvent('QBCore:Notify', OtherPlayer.PlayerData.source, 9, Lang:t("info.fine_received", {fine = price}), 5000, 0, 'blips', 'blip_radius_search', 'COLOR_WHITE')
end
end
end)
Expand Down Expand Up @@ -431,7 +431,7 @@ RegisterNetEvent('police:server:SearchPlayer', function(playerId)
local SearchedPlayer = exports['qbr-core']:GetPlayer(playerId)
if SearchedPlayer then
TriggerClientEvent('QBCore:Notify', src, 9, Lang:t("info.cash_found", {cash = SearchedPlayer.PlayerData.money["cash"]}), 5000, 0, 'blips', 'blip_radius_search', 'COLOR_WHITE')
TriggerClientEvent('QBCore:Notify', SearchedPlayer.PlayerData.source, Lang:t("info.being_searched"), 5000, 0, 'blips', 'blip_radius_search', 'COLOR_WHITE')
TriggerClientEvent('QBCore:Notify', SearchedPlayer.PlayerData.source, 9, Lang:t("info.being_searched"), 5000, 0, 'blips', 'blip_radius_search', 'COLOR_WHITE')
end
end)

Expand All @@ -445,7 +445,7 @@ RegisterNetEvent('police:server:SeizeCash', function(playerId)
SearchedPlayer.Functions.RemoveMoney("cash", moneyAmount, "police-cash-seized")
Player.Functions.AddItem("moneybag", 1, false, info)
TriggerClientEvent('inventory:client:ItemBox', src, sharedItems["moneybag"], "add")
TriggerClientEvent('QBCore:Notify', SearchedPlayer.PlayerData.source, Lang:t("info.cash_confiscated"), 5000, 0, 'blips', 'blip_radius_search', 'COLOR_WHITE')
TriggerClientEvent('QBCore:Notify', SearchedPlayer.PlayerData.source, 9, Lang:t("info.cash_confiscated"), 5000, 0, 'blips', 'blip_radius_search', 'COLOR_WHITE')
end
end)

Expand All @@ -457,8 +457,8 @@ RegisterNetEvent('police:server:RobPlayer', function(playerId)
local money = SearchedPlayer.PlayerData.money["cash"]
Player.Functions.AddMoney("cash", money, "police-player-robbed")
SearchedPlayer.Functions.RemoveMoney("cash", money, "police-player-robbed")
TriggerClientEvent('QBCore:Notify', SearchedPlayer.PlayerData.source, Lang:t("info.cash_robbed", {money = money}), 5000, 0, 'blips', 'blip_radius_search', 'COLOR_WHITE')
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t("info.stolen_money", {stolen = money}), 5000, 0, 'blips', 'blip_radius_search', 'COLOR_WHITE')
TriggerClientEvent('QBCore:Notify', SearchedPlayer.PlayerData.source, 9, Lang:t("info.cash_robbed", {money = money}), 5000, 0, 'blips', 'blip_radius_search', 'COLOR_WHITE')
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, 9, Lang:t("info.stolen_money", {stolen = money}), 5000, 0, 'blips', 'blip_radius_search', 'COLOR_WHITE')
end
end)

Expand Down Expand Up @@ -633,4 +633,3 @@ CreateThread(function()
UpdateBlips()
end
end)

0 comments on commit f9827a2

Please sign in to comment.