Skip to content

Commit

Permalink
fix(client): bug compatibility with vMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
renzuzu committed Jul 27, 2021
1 parent 4071a53 commit 5200b92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions renzu_hud/client/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ end)
RegisterCommand(config.commands['showstatus'], function()
Hud.show = not Hud.show
Hud:Myinfo(true)
PlaySoundFrontend(PlayerId(), "BACK", "HUD_FRONTEND_DEFAULT_SOUNDSET", true )
PlaySoundFrontend(-1, "BACK", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0 )
SendNUIMessage({
type = "setShowstatus",
content = {['bool'] = Hud.show, ['enable'] = config.enablestatus}
Expand Down Expand Up @@ -2070,7 +2070,7 @@ RegisterNUICallback('ChangeClothes', function(data)
TriggerEvent('skinchanger:getSkin', function(current)
TriggerEvent('skinchanger:loadClothes', current, config.clothing[data.variant].skin)
end)
PlaySoundFrontend(PlayerId(), 'BACK', 'HUD_FRONTEND_DEFAULT_SOUNDSET', 1)
PlaySoundFrontend(-1, 'BACK', 'HUD_FRONTEND_DEFAULT_SOUNDSET', 0)
Hud.clothestate[tostring(data.variant)] = false
print(Hud.clothestate[tostring(data.variant)])
if data.variant == 'mask_1' or data.variant == 'helmet_1' then
Expand Down Expand Up @@ -2103,7 +2103,7 @@ RegisterNUICallback('ChangeClothes', function(data)
end)
Hud.clothestate[tostring(data.variant)] = true
print(Hud.clothestate[tostring(data.variant)])
PlaySoundFrontend(PlayerId(), 'SELECT', 'HUD_FRONTEND_DEFAULT_SOUNDSET', 1)
PlaySoundFrontend(-1, 'SELECT', 'HUD_FRONTEND_DEFAULT_SOUNDSET', 0)
local table = {
['bool'] = Hud.clothestate[data.variant],
['variant'] = data.variant
Expand Down Expand Up @@ -2164,7 +2164,7 @@ AddEventHandler('renzu_hud:change_engine', function(engine)
local handling = Hud:GetHandlingfromModel(GetHashKey(engine))
local getcurrentvehicleweight = GetVehStats(Hud:getveh(), "CHandlingData","fMass")
print(getcurrentvehicleweight,handling['fMass'])
if getcurrentvehicleweight <= config.motorcycle_weight_check and handling['fMass'] > 600 then
if getcurrentvehicleweight <= config.motorcycle_weight_check and handling['Mass'] > 600 then
Hud:Notify('warning','Engine System',"this engine is not fit to this vehicle")
else
local bone = GetEntityBoneIndexByName(Hud:getveh(),'engine')
Expand Down
10 changes: 5 additions & 5 deletions renzu_hud/client/function.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,7 @@ function Hud:accidentsound()
if not self.sounded then
self.sounded = true
Citizen.CreateThread(function()
PlaySoundFrontend(-1, "SCREEN_FLASH", "CELEBRATION_SOUNDSET", 1)
PlaySoundFrontend(-1, "SCREEN_FLASH", "CELEBRATION_SOUNDSET", 0)
Citizen.Wait(1)
self.sounded = false
return
Expand Down Expand Up @@ -2092,7 +2092,7 @@ function Hud:Boost(hasturbo)
end

function Hud:vehiclemode()
PlaySoundFrontend(PlayerId(), 'NAV_UP_DOWN', 'HUD_FRONTEND_DEFAULT_SOUNDSET', 1)
PlaySoundFrontend(-1, 'NAV_UP_DOWN', 'HUD_FRONTEND_DEFAULT_SOUNDSET', 0)
if self.mode == 'NORMAL' then
self.mode = 'SPORTS'
SendNUIMessage({
Expand Down Expand Up @@ -2236,9 +2236,9 @@ function Hud:differential()
self:Notify('success','Vehicle Differential',"AWD Activated")
end
if self.togglediff then
PlaySoundFrontend(PlayerId(), 'SELECT', 'HUD_FRONTEND_DEFAULT_SOUNDSET', 1)
PlaySoundFrontend(-1, 'SELECT', 'HUD_FRONTEND_DEFAULT_SOUNDSET', 0)
else
PlaySoundFrontend(PlayerId(), 'BACK', 'HUD_FRONTEND_DEFAULT_SOUNDSET', 1)
PlaySoundFrontend(-1, 'BACK', 'HUD_FRONTEND_DEFAULT_SOUNDSET', 0)
end
SendNUIMessage({
type = "setDifferential",
Expand Down Expand Up @@ -2289,7 +2289,7 @@ function Hud:playanimation(animDict,name)
end

function Hud:Cruisecontrol()
PlaySoundFrontend(PlayerId(), "BACK", "HUD_FRONTEND_DEFAULT_SOUNDSET", true )
PlaySoundFrontend(-1, "BACK", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0 )
self.cruising = not self.cruising
Citizen.Wait(500)
Citizen.CreateThread(function()
Expand Down

0 comments on commit 5200b92

Please sign in to comment.