Skip to content

Commit

Permalink
fix radar not disabling when player is loading in
Browse files Browse the repository at this point in the history
  • Loading branch information
thoo0224 committed Jun 20, 2022
1 parent d39c57f commit c1ea4b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ AddEventHandler('cfx_gps:removeGps', function()
DisplayRadar(false)
end)

RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(player)
TriggerEvent('cfx_gps:removeGps')

local inventory = player.inventory;
for i=1, #inventory, 1 do
for i = 1, #inventory, 1 do
local item = inventory[i]
if item.name == Config.Item and item.count > 0 then
TriggerEvent('cfx_gps:addGps')
Expand Down

0 comments on commit c1ea4b7

Please sign in to comment.