Skip to content

Commit

Permalink
Fix police search
Browse files Browse the repository at this point in the history
  • Loading branch information
GhzGarage committed May 22, 2024
1 parent 5d357c6 commit f440fd1
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 @@ -682,9 +682,9 @@ RegisterNetEvent('police:server:SearchPlayer', function()
if PlayerData.job.type ~= 'leo' then return end
local player, distance = QBCore.Functions.GetClosestPlayer(src)
if player ~= -1 and distance < 2.5 then
local SearchedPlayer = QBCore.Functions.GetPlayer(player)
local SearchedPlayer = QBCore.Functions.GetPlayer(tonumber(player))
if not SearchedPlayer then return end
exports['qb-inventory']:OpenInventoryById(src, player)
exports['qb-inventory']:OpenInventoryById(src, tonumber(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 f440fd1

Please sign in to comment.