Studio PLAYERS
  • Studio PLAYERS
  • 📦QB/QBX SCRIPTS
    • 💸SA-MONEY
      • 💡Introduction
      • ⚙️Installation
        • ⚙️Installation
        • ⚙️Migration
        • ⚙️Add new currency
      • 🗃️Displays $ in inventory
      • 📚HUD Implementations
        • 📗17mov_Hud
        • 📗wais-hudv5
    • 💰SA-MONEYWASH
      • 💡Introduction
      • ⚙️Installation
    • 🕐SA-PLAYTIME
      • 💡Introduction
      • ⚙️Installation
      • ✈️Exports
    • ☠️SA-CHARACTERKILL
      • 💡Introduction
      • ⚙️Installation
    • 🧊SA-BOXE
      • 💡Introduction
      • 💡Usage
      • ⚙️Installation
    • 🚦SA-TRAFFICLIGHTSPRIORITY
      • 💡Introduction
      • ⚙️Installation
  • 📦ESX SCRIPTS
    • 🕐SA-PLAYTIME
      • 💡Introduction
      • ⚙️Installation
      • ✈️Exports
    • ☠️SA-CHARACTERKILL
      • 💡Introduction
      • ⚙️Installation
    • 🚦SA-TRAFFICLIGHTSPRIORITY
      • 💡Introduction
      • ⚙️Installation
  • 🛠️FAQ
    • 🛠️General Issues
    • 🛠️SA-Money-V2
Powered by GitBook
On this page
  1. QB/QBX SCRIPTS
  2. SA-MONEY
  3. HUD Implementations

wais-hudv5

This page describes how to fix issues with updating money.

Last updated 1 year ago

  • To fix the problem with updating money use this snippet.

  • Add this snippet into wais-hudv5/client.lua

  • Here is a link to an example of the and how it should look.

📦
💸
📚
📗
full file
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)