Skip to content

Commit

Permalink
Update main.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
GhzGarage authored May 21, 2024
1 parent e0fd82e commit 5d357c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -680,11 +680,11 @@ RegisterNetEvent('police:server:SearchPlayer', function()
if not Player then return end
local PlayerData = Player.PlayerData
if PlayerData.job.type ~= 'leo' then return end
local player, distance = QBCore.Functions.GetClosestPlayer()
local player, distance = QBCore.Functions.GetClosestPlayer(src)
if player ~= -1 and distance < 2.5 then
local SearchedPlayer = QBCore.Functions.GetPlayer(player)
if not SearchedPlayer then return end
exports['qb-inventory']:OpenInventoryById(src, playerId)
exports['qb-inventory']:OpenInventoryById(src, player)
TriggerClientEvent('QBCore:Notify', src, Lang:t('info.cash_found', { cash = SearchedPlayer.PlayerData.money['cash'] }))
TriggerClientEvent('QBCore:Notify', player, Lang:t('info.being_searched'))
else
Expand Down

0 comments on commit 5d357c6

Please sign in to comment.