Advertisement
yayaoastur0568

Untitled

Jul 19th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. count = {}
  2. haspoked = {}
  3. poketime = {}
  4. maxpokes = 3
  5. maxtime = 60
  6.  
  7. function onClientPokeEvent(serverConnectionHandlerID, pokerID, pokerName, message, ffIgnored)
  8. if (pokerID ~= haspoked[pokerID]) then
  9. haspoked[pokerID] = pokerID
  10. count[pokerID] = 1
  11. poketime[pokerID] = os.time()
  12. ts3.requestSendPrivateTextMsg(serverConnectionHandlerID, "PRIVATE TEXT", pokerID)
  13. elseif(pokerID == haspoked[pokerID])then
  14. if (count[pokerID] >= maxpokes and os.difftime(poketime[pokerID],os.time()) <= maxtime) then
  15. ts3.requestClientKickFromServer(serverConnectionHandlerID,pokerID,"REASON FOR THE KICK")
  16. poketime[pokerID] = os.time()
  17. else
  18. if(os.difftime(poketime[pokerID],os.time()) > maxtime) then
  19. poketime[pokerID] = os.time
  20. end
  21. ts3.requestSendPrivateTextMsg(serverConnectionHandlerID, "PRIVATE TEXT", pokerID)
  22. count[pokerID] = count[pokerID]+1
  23. end
  24. end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement