Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import es
- def load():
- es.addons.registerClientCommandFilter(ClientCommandFilterCallBack)
- def ClientCommandFilterCallBack(userid, arguments):
- returnvalue = True
- if arguments[0].lower() == 'joinclass' and es.getlivingplayercount():
- classid = 2 + es.getplayerteam(userid)
- if len(arguments) >= 1 and arguments[1].isdigit():
- classid = int(arguments[1])
- es.setplayerprop(userid, 'CCSPlayer.m_iClass', classid)
- es.setplayerprop(userid, 'CBasePlayer.m_lifeState', es.getplayerprop(userid, 'CBasePlayer.m_lifeState') & ~3)
- returnvalue = False
- return returnvalue
- def unload():
- es.addons.unregisterClientCommandFilter(ClientCommandFilterCallBack)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement