def editmute(caller,boolean=None,cn=None): """If there are no arguments other than #editmute then the caller will be editmuted. The first argument is a boolen that says what state of editmuted the player will be (0 for not editmuted and 1 for editmuted), anything other than 0 will result in an editmute. The cn is the client number of the player that the caller want editmuted. If left off it will apply to the caller.""" #empty args if boolean is None: boolean=1 if cn is None: if(caller[0]=="ingame"): cn=caller[1] else: raise ServerError("You are not ingame. Please specify cn.") cn=int(cn) boolean=int(boolean) if boolean: spectator(caller,0,cn) sbserver.editMute(cn) triggerServerEvent("player_editmuted",[cn]) else: sbserver.editUnmute(cn) triggerServerEvent("player_editunmuted",[cn])
def editmute(caller,boolean=None,cn=None): """Sets an editmute on the given cn. If the cn is left off it applies to the caller.""" #empty args if boolean is None: boolean=1 if cn is None: if(caller[0]=="ingame"): cn=caller[1] else: raise ServerError("You are not ingame. Please specify cn.") cn=int(cn) boolean=int(boolean) if boolean: spectator(caller,0,cn) sbserver.editMute(cn) triggerServerEvent("player_editmuted",[cn]) else: sbserver.editUnmute(cn) triggerServerEvent("player_editunmuted",[cn])