Advertisement
AutismAlex

uBalance Functions

Jan 15th, 2020
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. function balDecrease(player, amount){
  2. database.execute(str.format("UPDATE uBalance SET balance = balance - '{0}' WHERE id = '{1}';", amount, player.id));
  3. }
  4. function balIncrease(player, amount){
  5. database.execute(str.format("UPDATE uBalance SET balance = balance + '{0}' WHERE id = '{1}';", amount, player.id));
  6. }
  7. function balGet(player){
  8. Result = database.execute(str.format("Select * FROM uBalance WHERE id = '{0}';", player.id));
  9. Player = Result[0];
  10. Balance = Player[1];
  11. Balance = toNumber(Balance);
  12. return Balance;
  13. }
  14. function balreset(player){
  15. database.execute(str.format("UPDATE uBalance SET balance = balance - balance WHERE id = '{0}';", player.id));
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement