#!/usr/bin/env python #!/usr/bin/env python import es import playerlib import psyco import gamethread import popuplib psyco.full() info = es.AddonInfo() info.name = "Color Mod" info.version = "1.0" info.author = "sonicsight" info.url = "http://www.sonicsightz.com/" info.basename = "colorMod" info.description = "Color mod allows players to change there colors" # below is where you would add more colors if you want follor this example: ",'color name':(red 0-255,green 0-255,blue 0-255)" colors = {'red':(255,0,0),'green':(0,255,0),'blue':(0,0,255),'yellow':(255,255,0),'purple':(255,0,255),'cyan':(0,255,255)} def load(): es.set("%s_version" % info.basename,info.version) es.makepublic("%s_version" % info.basename) es.msg("#multi","#green [%s]#default %s has loaded." % (info.basename,info.name)) es.regsaycmd('!color','colorMod/showMenu') global colorPop colorPop = popuplib.easymenu("colorPop",None,changeColor) colorPop.settitle("Pick your color:") for color in colors: colorPop.addoption(color,color) def unload(): es.msg("#multi","#green [%s]#default %s has unloaded." % (info.basename,info.name)) es.unregsaycmd('!color') def round_start(ev): es.msg("#multi","#green [%s]#default %s is running. Type#lightgreen !color#default to change your color." % (info.basename,info.name)) def showMenu(): colorPop.send(es.getcmduserid()) def changeColor(uId,option,popName): playerlib.getPlayer(uId).set("color",(colors[option][0],colors[option][1],colors[option][2]))