Advertisement
actuallykane

User class

Nov 26th, 2018
66,057
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.24 KB | None | 0 0
  1. -- Getters
  2. user.getMoney() -- Returns number
  3. user.getBank() -- Returns number
  4. user.getCoords() -- Returns table(coords.x, coords.y, coords.z)
  5. user.getSessionVar(key) -- Returns stored session variable
  6. user.getPermissions() -- Returns int
  7. user.getIdentifier() -- Returns user identifier, most likely hex steamid64
  8. user.getGroup() -- Returns string of a users group
  9. user.get('item') -- Can be used for all of the above
  10.  
  11. -- Setters
  12. user.setMoney(amount) -- Sets the user money
  13. user.setBankBalance(amount) -- Sets the user bank balance
  14. user.removeMoney(amount) -- Removes from the current amount of user money
  15. user.addMoney(amount) -- Adds to the current amount of user money
  16. user.removeBank(amount) -- Removes from the current amount of user bank balance
  17. user.addBank(amount) -- Adds to the current amount of user bank balance
  18.  
  19. -- Functions
  20. user.displayMoney(amount) -- Used to display amount of money in UI
  21. user.displayBank(amount) -- Same as above for bank, only use if using NativeUI option
  22. user.kick(reason) -- Kicks user with specified reason
  23.  
  24. -- Roles
  25. user.addRole(role) -- Adds a role to a user
  26. user.removeRole(role) -- Removes a role from a user
  27. user.hasRole(role) -- Returns true/false depending on if the user has the specified role
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement