Closed Zasty closed 4 years ago
local user = MySQL.Sync.fetchAll('SELECT `amount` FROM `invest` WHERE `identifier`=@id AND active=1', {["@id"] = xPlayer.getIdentifier()})
local invested = 0
for k, v in pairs(user) do
-- print(k, v.identifier, v.amount, v.job)
invested = math.floor(invested + v.amount)
end
TriggerClientEvent("invest:nui", _source, {
type = "balance",
player = xPlayer.getName(),
balance = invested
})
end)
Under event: invest:balance
Thanks, i will try this.
@JnKTechstuff thanks ❤️
https://i.imgur.com/Wa19JS9.png more numbers plz xdd (joke)
Can u fix that? Thanks :*