mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 09:18:53 +00:00
feat(es_extended): Sync accounts with Accounts
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
local pickups = {}
|
||||
|
||||
local PlayerBank, PlayerMoney = 0,0
|
||||
CreateThread(function()
|
||||
while not Config.Multichar do
|
||||
Wait(0)
|
||||
@@ -198,6 +198,13 @@ AddEventHandler('esx:setAccountMoney', function(account)
|
||||
for i=1, #(ESX.PlayerData.accounts) do
|
||||
if ESX.PlayerData.accounts[i].name == account.name then
|
||||
ESX.PlayerData.accounts[i] = account
|
||||
if ESX.PlayerData.accounts[i].name == "bank" then
|
||||
PlayerBank = account.money
|
||||
StatSetInt("BANK_BALANCE", PlayerBank, true)
|
||||
elseif ESX.PlayerData.accounts[i].name == "money" then
|
||||
PlayerMoney = account.money
|
||||
StatSetInt("MP0_WALLET_BALANCE", PlayerMoney, true)
|
||||
end
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -407,8 +414,9 @@ end
|
||||
if Config.EnableHud then
|
||||
CreateThread(function()
|
||||
local isPaused = false
|
||||
local time = 500
|
||||
|
||||
while true do
|
||||
local time = 500
|
||||
Wait(time)
|
||||
|
||||
if IsPauseMenuActive() and not isPaused then
|
||||
|
||||
Reference in New Issue
Block a user