📗wais-hudv5
This page describes how to fix issues with updating money.
To fix the problem with updating money use this snippet.
https://github.com/Studio-PLAYERS/TEBEX-Doc/blob/main/SA-Money/HUD-Implementations/wais-hudv5/snippet.lua
local function updateMoney()
local PlayerData = wFramework.Functions.GetPlayerData()
SendNUIMessage({
type = "UPDATE_CASH",
cash = PlayerData.money['cash'],
firstTime = false,
})
end
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
CreateThread(function()
while true do
Wait(1000)
updateMoney()
end
end)
end)
AddEventHandler('onResourceStart', function(resourceName)
if (GetCurrentResourceName() ~= resourceName) then
return
end
CreateThread(function()
while true do
Wait(1000)
updateMoney()
end
end)
end)
Add this snippet into wais-hudv5/client.lua
Here is a link to an example of the full file and how it should look.
Last updated