23 lines
477 B
Lua
23 lines
477 B
Lua
local radarEnabled = false
|
|
local playerLoaded = false
|
|
|
|
AddEventHandler('devx_core:client:playerLoaded', function()
|
|
playerLoaded = true
|
|
radarEnabled = true
|
|
end)
|
|
|
|
RegisterNetEvent('devx_hud:client:setVisible', function(state)
|
|
radarEnabled = state == true
|
|
end)
|
|
|
|
RegisterCommand('hud', function()
|
|
radarEnabled = not radarEnabled
|
|
end, false)
|
|
|
|
CreateThread(function()
|
|
while true do
|
|
Wait(0)
|
|
DisplayRadar(playerLoaded and radarEnabled)
|
|
end
|
|
end)
|