-DxHUD for ESX Legacy
+dx_hud for ESX Legacy
Copyright © 2022 [Demxn](https://github.com/0xDEMXN)
diff --git a/client.lua b/client.lua
index 0349828..d57443b 100644
--- a/client.lua
+++ b/client.lua
@@ -1,8 +1,8 @@
local playerId = PlayerId()
-CreateThread(function()
- while true do
- if ESX.PlayerLoaded then
+local GeneralLoop = function()
+ CreateThread(function()
+ while ESX.PlayerLoaded do
local ped = PlayerPedId()
local underwaterTime = GetPlayerUnderwaterTimeRemaining(playerId) * 10
@@ -33,17 +33,16 @@ CreateThread(function()
DisplayRadar(dx.persistentRadar or isDriving)
SetRadarZoom(1150)
SendNUIMessage({showUi = not IsPauseMenuActive()})
- else
- SendNUIMessage({showUi = false})
- end
- Wait(dx.generalRefreshRate)
- end
-end)
+ Wait(dx.generalRefreshRate)
+ end
+ SendNUIMessage({showUi = false})
+ end)
+end
-CreateThread(function()
- while true do
- if ESX.PlayerLoaded then
+local StatusLoop = function()
+ CreateThread(function()
+ while ESX.PlayerLoaded do
local hunger, thirst, stress = false, false, false
local statusReady = false
@@ -65,11 +64,11 @@ CreateThread(function()
thirst = thirst,
stress = dx.showStress and stress,
})
- end
- Wait(dx.statusRefreshRate)
- end
-end)
+ Wait(dx.statusRefreshRate)
+ end
+ end)
+end
if dx.circleMap then
CreateThread(function()
@@ -83,9 +82,9 @@ if dx.circleMap then
SetMinimapComponentPosition('minimap_mask', 'L', 'B', 0.06, 0.05, 0.132, 0.260)
SetMinimapComponentPosition('minimap_blur', 'L', 'B', 0.005, -0.01, 0.166, 0.257)
- Wait(1000)
+ Wait(500)
SetRadarBigmapEnabled(true, false)
- Wait(1000)
+ Wait(500)
SetRadarBigmapEnabled(false, false)
local minimap = RequestScaleformMovie("minimap")
@@ -107,6 +106,9 @@ end)
RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function()
ESX.PlayerLoaded = true
+ GeneralLoop()
+ StatusLoop()
+ SendNUIMessage({playerId = GetPlayerServerId(playerId)})
end)
RegisterNetEvent('esx:onPlayerLogout')
diff --git a/fxmanifest.lua b/fxmanifest.lua
index 546dd76..5666612 100644
--- a/fxmanifest.lua
+++ b/fxmanifest.lua
@@ -1,7 +1,10 @@
fx_version 'cerulean'
game 'gta5'
author '0xDEMXN'
-version '1.0.5'
+version '1.0.6'
+
+lua54 'yes'
+use_fxv2_oal 'yes'
shared_scripts {
'@es_extended/imports.lua'
@@ -16,7 +19,7 @@ files {
'html/ui.html',
'html/script.js',
'html/style.css',
- 'html/loading-bar.js',
+ 'html/logo.png',
}
ui_page 'html/ui.html'
diff --git a/html/logo.png b/html/logo.png
new file mode 100644
index 0000000000000000000000000000000000000000..d65ea6308257cb73da7b89be81a183de9987ae63
GIT binary patch
literal 9418
zcmV;*BsJTKP)HCNwD`HFQ`NaQW+EFGv?GsJm-f6{!mPM+Bs2X72f&^WE=G?o1{SFi}8x
zp6|I~W|EmX?sne`oGRkmzOShe?=IHLtE1OD>2U@Kbjm1K*
zv1rciZ?<$Pf8VMR1yf*A)Ent%YG>f8U}l!_TmMrs09t7KBIDngx3A-wOa1joD(=3RY9Q?f?4I0@&OG
z;N5PpY1yMy6$paWV%EySXnldm+Hcm91wKD3VGL~T3J2Z@dAG)7Fm2|FEarf!TDxY)>S4=aQx8B8
zT#Kfq_phv#E$?ED1uYUhEde#qg#Na)YP@E~#Qc8yU%hREdt*;H`A%?ydqZ#O_&fc+
zo?x#CtVNeVR?^x5m|V@1b)}b|T-W!2YkiOe?{=47sE->#pT~x=sci|sZvuc?>&*cb
zXzHl_n)S;b&vS0L_8@HP2@UIl-S9!M3pQU1$Jg}PJ$YPdd)X(OTiyMTds{Fy^H$h&
zjfC$jxiWg-n5)V0`|N-=v8`Nw!F5c!oMN_jLo2L
zCCz_xVOSiRd;@Ik#lCpMx**BDDF}|e(Oc@;rK>aJ@%FHM{E(E=N(ZwR`dtq-q@VfK
z-|{?n7DXTdPjZxXKDDmTx8(9L_P7`bs1Q3>4_QjjqXK9zAq$XM$AYQG5EQ->z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