Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import es
- import playerlib
- INDEX_GREY = -1
- INDEX_LIGHTGREEN = 0
- COLORS2TEAM = {'red':{'team':'t', 'number':2}, 'blue':{'team':'ct', 'number':3}}
- def getIndex(color='lightgreen'):
- color = color.lower().strip('"')
- if color in ('red', 'blue') es.getplayercount(COLORS2TEAM[color]['number']):
- return playerlib.getPlayerList('#' + COLORS2TEAM[color]['team']).index
- return INDEX_GREY if color == 'grey' else INDEX_LIGHTGREEN
- """
- getIndex('lightgreen|grey|red|blue')
- @RETURN int index - Return a index (to use with usermsg!) if it can provided, else 0 (=lightgreen) by default
- """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement