Skip to content

Commit

Permalink
Prevent trying to display invalid player's name
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathu-lmn authored Jul 9, 2024
1 parent 42f4f89 commit e13c118
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/blipsnames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ end)
RegisterNetEvent('qb-admin:client:Show', function(players)
for _, player in pairs(players) do
local playeridx = GetPlayerFromServerId(player.id)
if playeridx == -1 and player.id ~= PlayerId() then
return
end
local ped = GetPlayerPed(playeridx)
local blip = GetBlipFromEntity(ped)
local name = 'ID: ' .. player.id .. ' | ' .. player.name
Expand Down

0 comments on commit e13c118

Please sign in to comment.