From d5cc80f54aacd01d60134f7e928420d80b135441 Mon Sep 17 00:00:00 2001 From: PrimacoDoAco <67328692+PrimacoDoAco@users.noreply.github.com> Date: Wed, 12 May 2021 21:58:29 +0100 Subject: [PATCH 1/6] Update client.lua --- cosmo_hud/client.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cosmo_hud/client.lua b/cosmo_hud/client.lua index bca3056..1f518ad 100644 --- a/cosmo_hud/client.lua +++ b/cosmo_hud/client.lua @@ -129,7 +129,7 @@ CreateThread(function() Wait(2000) SetRadarZoom(1150) if Config.AlwaysShowRadar == false then - if IsPedInAnyVehicle(PlayerPedId(-1), false) then + if IsPedInAnyVehicle(PlayerPedId(), false) then DisplayRadar(true) else DisplayRadar(false) @@ -148,7 +148,7 @@ CreateThread(function() if Config.ShowFuel == true then if isDriving and IsPedInAnyVehicle(PlayerPedId(), true) then local veh = GetVehiclePedIsUsing(PlayerPedId(), false) - local fuellevel = GetVehicleFuelLevel(veh) + local fuellevel = exports["LegacyFuel"]:GetFuel(veh) SendNUIMessage({ action = "update_fuel", fuel = fuellevel, From 1d9bffef5bf3403c3fd7c304e9060b8545334803 Mon Sep 17 00:00:00 2001 From: PrimacoDoAco <67328692+PrimacoDoAco@users.noreply.github.com> Date: Wed, 12 May 2021 22:01:15 +0100 Subject: [PATCH 2/6] Update script.js --- cosmo_hud/html/script.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cosmo_hud/html/script.js b/cosmo_hud/html/script.js index 9323695..877ee08 100644 --- a/cosmo_hud/html/script.js +++ b/cosmo_hud/html/script.js @@ -192,15 +192,12 @@ window.addEventListener("message", function (event) { } if (data.action == "update_fuel") { - let finalfuel = (data.fuel / 100) * 1.5385; - if (finalfuel > 0.9) { - FuelIndicator.animate(1.0); - } else if (finalfuel < 0.9) { - FuelIndicator.animate(finalfuel); + let finalfuel = (data.fuel / 100); + FuelIndicator.animate(finalfuel); } - if (finalfuel < 0.2) { + if (finalfuel < 0.20) { FuelIndicator.path.setAttribute("stroke", "red"); - } else if (finalfuel > 0.2) { + } else if (finalfuel > 0.20) { FuelIndicator.path.setAttribute("stroke", "white"); } } From 0cb2917f3f72a0f0b804affd37d88012b1d33d87 Mon Sep 17 00:00:00 2001 From: PrimacoDoAco <67328692+PrimacoDoAco@users.noreply.github.com> Date: Wed, 12 May 2021 23:13:58 +0100 Subject: [PATCH 3/6] Update client.lua --- cosmo_hud/client.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosmo_hud/client.lua b/cosmo_hud/client.lua index 1f518ad..5e1708b 100644 --- a/cosmo_hud/client.lua +++ b/cosmo_hud/client.lua @@ -129,7 +129,7 @@ CreateThread(function() Wait(2000) SetRadarZoom(1150) if Config.AlwaysShowRadar == false then - if IsPedInAnyVehicle(PlayerPedId(), false) then + if IsPedInAnyVehicle(GetPlayerPed(-1), false) then DisplayRadar(true) else DisplayRadar(false) From c6e609bf183871760f6d93e1c8007b6dffef8ec5 Mon Sep 17 00:00:00 2001 From: PrimacoDoAco <67328692+PrimacoDoAco@users.noreply.github.com> Date: Wed, 12 May 2021 23:15:37 +0100 Subject: [PATCH 4/6] Update client.lua --- cosmo_hud/client.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosmo_hud/client.lua b/cosmo_hud/client.lua index 5e1708b..a4c62e5 100644 --- a/cosmo_hud/client.lua +++ b/cosmo_hud/client.lua @@ -129,7 +129,7 @@ CreateThread(function() Wait(2000) SetRadarZoom(1150) if Config.AlwaysShowRadar == false then - if IsPedInAnyVehicle(GetPlayerPed(-1), false) then + if IsPedInAnyVehicle(PlayerPedId(-1), false) then DisplayRadar(true) else DisplayRadar(false) From b30146e077a8a75acfd8e1e2d3eb4ea65ce35a50 Mon Sep 17 00:00:00 2001 From: PrimacoDoAco <67328692+PrimacoDoAco@users.noreply.github.com> Date: Sat, 15 May 2021 21:13:42 +0100 Subject: [PATCH 5/6] Update client.lua --- cosmo_hud/client.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosmo_hud/client.lua b/cosmo_hud/client.lua index a4c62e5..62211d8 100644 --- a/cosmo_hud/client.lua +++ b/cosmo_hud/client.lua @@ -22,7 +22,7 @@ Citizen.CreateThread(function() local veh = GetVehiclePedIsUsing(PlayerPedId(), false) local speed = math.floor(GetEntitySpeed(veh) * SpeedMultiplier) local vehhash = GetEntityModel(veh) - local maxspeed = GetVehicleModelMaxSpeed(vehhash) * 3.6 + local maxspeed = GetVehicleModelMaxSpeed(vehhash) * SpeedMultiplier) SendNUIMessage({speed = speed, maxspeed = maxspeed}) end end From 6d31c1c62dd79ceed9d5862981a5526b91a7c7c8 Mon Sep 17 00:00:00 2001 From: PrimacoDoAco <67328692+PrimacoDoAco@users.noreply.github.com> Date: Fri, 21 May 2021 19:26:31 +0100 Subject: [PATCH 6/6] Update client.lua --- cosmo_hud/client.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosmo_hud/client.lua b/cosmo_hud/client.lua index 62211d8..3d1e997 100644 --- a/cosmo_hud/client.lua +++ b/cosmo_hud/client.lua @@ -22,7 +22,7 @@ Citizen.CreateThread(function() local veh = GetVehiclePedIsUsing(PlayerPedId(), false) local speed = math.floor(GetEntitySpeed(veh) * SpeedMultiplier) local vehhash = GetEntityModel(veh) - local maxspeed = GetVehicleModelMaxSpeed(vehhash) * SpeedMultiplier) + local maxspeed = (GetVehicleModelMaxSpeed(vehhash) * SpeedMultiplier) SendNUIMessage({speed = speed, maxspeed = maxspeed}) end end