Advertisement
BobMe

inprogression

May 15th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. stringbans = "Memo1332;being skinny;6/hurtjake6;being a skinnier skinny;23432423423546433/"
  2.  
  3. tablebans = {}
  4.  
  5. amountofbans = 0
  6.  
  7. savevar = 1
  8.  
  9. for i=1,#stringbans do
  10. if string.sub(stringbans,i,i) == ";" then
  11. table.insert(tablebans,#tablebans+1,string.sub(stringbans,savevar,i-1))
  12. savevar = i+1
  13. elseif string.sub(stringbans,i,i) == "/" and i ~= 1 then
  14. table.insert(tablebans,#tablebans+1,string.sub(stringbans,savevar,i-1))
  15. savevar = i+1
  16. amountofbans = amountofbans + 1
  17. end
  18. end
  19.  
  20. function diagnosebans(tab)
  21. local amountofbans = #tab/3
  22. for i=1,amountofbans do
  23. print("Player banned by : "..tab[i+(3*i-1)])
  24. print(" -- Reason : "..tab[(i+1)+(3*i-1)])
  25. print(" -- Tier : "..tab[(i+2)+(3*i-1)])
  26. end
  27. end
  28.  
  29. diagnosebans(tablebans)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement