Advertisement
incinirate

pay

Jun 25th, 2015
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1. local args = {...}
  2.  
  3. local tAPI = args[1]
  4. local user = args[2]
  5. local mode = args[3]
  6. local enduser = args[4]
  7. local amount = tonumber(args[5])
  8. --print(tAPI.message)
  9. if enduser and amount then
  10.   if tAPI.isPlayerOnline(enduser) and amount <= tAPI.getLBC(user) and amount >= 1 then
  11.      tAPI.setLBC(user, tAPI.getLBC(user)-amount)
  12.      tAPI.setLBC(enduser, tAPI.getLBC(user)+amount)
  13.      tAPI.message(mode, user, "You sent "..amount.." LBC to "..enduser)
  14.      tAPI.message(mode, enduser, "You were sent "..amount.." LBC by "..user)
  15.   else
  16.     tAPI.message(mode, user, "That user is not online.")
  17.   end
  18. else
  19.   tAPI.message( mode, user, "Invalid Syntax. pay <user> <amount>")
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement