Open tupixx opened 3 years ago
This is the fix code for offline player recive the money?
This is the fix code for offline player recive the money?
y
Someone can help me, i use "Discord" for replace "Identifier" in DATABASE, I can't adapt the script so that it is correctly linked to the database. Thank you for your help
function UpdateCash(identifier, cash) local xPlayer = ESX.GetPlayerFromIdentifier(identifier)
accs.bank = accs.bank + cash MySQL.Async.execute("UPDATE users SET account = @newBank WHERE identifier = @identifier", { ["@identifier"] = identifier, ["@newBank"] = json.encode(accs) } ) end end) end end