πwais-hudv5
This page describes how to fix issues with updating money.
https://github.com/Studio-PLAYERS/TEBEX-Doc/blob/main/SA-Money/HUD-Implementations/wais-hudv5/snippet.lua
Last updated
This page describes how to fix issues with updating money.
Last updated
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)