Advertisement
actuallykane

Global usage

Mar 6th, 2019
4,889
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.30 KB | None | 0 0
  1. -- Sets a global function on a user, call only once like on es:playerLoaded
  2. user.setGlobal('global', 'default') -- See example below
  3.  
  4. user.setGlobal('job', 'citizen')
  5. -- Will create 2 new functions on the user
  6. user.setJob(value) -- Sets the global 'job' to value
  7. user.getJob() -- Gets the global 'job'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement