Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.72 KB | None | 0 0
  1. import es
  2.  
  3. def load():
  4.     es.addons.registerClientCommandFilter(ClientCommandFilterCallBack)
  5.    
  6. def ClientCommandFilterCallBack(userid, arguments):
  7.     returnvalue = True
  8.     if arguments[0].lower() == 'joinclass' and es.getlivingplayercount():
  9.         classid = 2 + es.getplayerteam(userid)
  10.         if len(arguments) >= 1 and arguments[1].isdigit():
  11.             classid = int(arguments[1])
  12.         es.setplayerprop(userid, 'CCSPlayer.m_iClass', classid)
  13.         es.setplayerprop(userid, 'CBasePlayer.m_lifeState', es.getplayerprop(userid, 'CBasePlayer.m_lifeState') & ~3)
  14.         returnvalue = False
  15.     return returnvalue
  16.    
  17. def unload():
  18.     es.addons.unregisterClientCommandFilter(ClientCommandFilterCallBack)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement