Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.86 KB | None | 0 0
  1. ########################
  2. #####WAIT CT REWRITTEN##
  3. ##### BY JACKMASTER#####
  4. ########################
  5.  
  6. import es
  7. import cPickle
  8.  
  9. addonpath = es.getAddonPath("CTWait").replace("\\", "/")
  10. dbpath = addonpath + "/CTWait.db"
  11. need_rounds = 50
  12. rounds = {}
  13. try:
  14.     rounds = cPickle.load(open(dbpath, "rb"))
  15. except:
  16.         pass
  17.  
  18. def round_start(ev):
  19.     userid = ev['userid']
  20.     steamid = ev['es_steamid']
  21.     if not rounds = need_rounds:
  22.         rounds.append(steamid)
  23.    
  24.     cPickle.dump(rounds, open(dbpath, "wb"))
  25.    
  26.  
  27.  
  28.  
  29. def player_team(ev):
  30.     userid = ev['userid']
  31.     team = es.getplayerteam(userid)
  32.     if team == 3:
  33.         if need_rounds in rounds:
  34.             pass
  35.         else:
  36.             es.tell(userid, 'Du kannst dem CT Team nicht joinen')
  37.        
  38. def unload():
  39.     cPickle.dump(rounds, open(dbpath, "wb"))
  40.  
  41. ########################
  42. #####WAIT CT REWRITTEN##
  43. ##### BY JACKMASTER#####
  44. ########################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement