Skip to content

Commit

Permalink
fix: blips and names not showing (Qbox-project#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
Molicheu authored Dec 24, 2023
1 parent 64ab750 commit f844fc1
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions client/admin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,6 @@ local showNames = false
local netCheck1 = false
local netCheck2 = false

CreateThread(function()
while true do
Wait(1000)
if netCheck1 or netCheck2 then
TriggerServerEvent('qbx_admin:server:getPlayersForBlips')
end
end
end)

RegisterNetEvent('qbx_admin:client:blips', function()
if not showBlips then
showBlips = true
Expand All @@ -291,7 +282,8 @@ RegisterNetEvent('qbx_admin:client:names', function()
end
end)

RegisterNetEvent('qbx_admin:client:Show', function(players)
RegisterNetEvent('qbx_admin:client:Show', function()
local players = lib.callback.await('qbx_admin:server:getPlayers', false)
for _, player in pairs(players) do
local playerId = GetPlayerFromServerId(player.id)
local ped = GetPlayerPed(playerId)
Expand Down Expand Up @@ -478,3 +470,12 @@ RegisterNetEvent('qbx_admin:client:Show', function(players)
end
end
end)

CreateThread(function()
while true do
Wait(1000)
if netCheck1 or netCheck2 then
TriggerEvent('qbx_admin:client:Show')
end
end
end)

0 comments on commit f844fc1

Please sign in to comment.