21.11.2009, 16:30
ok this time the cmd works sort of in a way that everytime you try set set a players admin it sets it to zero not sure y
thanks
thanks
Код:
irccmd_setadmin(conn, channel[], user[], params[]) { #pragma unused params,user,conn new playerid; new id,string[128],number; if(sscanf(params, "ud", id, number)) return IRC_GroupSay(GroupID[0],channel, "USAGE: /SETADMINLEVEL [ID / NAME] [0/10]"); if(!IsPlayerConnected(id)) return IRC_GroupSay(GroupID[0],channel, "This player is offline"); if(number < 0 || number > 10) return IRC_GroupSay(GroupID[0],channel,"ERROR: Invaild Level: [0/10]"); if(GetInfo(id,"AdminLevel")==number) return IRC_GroupSay(GroupID[0],channel, "This player is already administrator with that level"); format(string,sizeof(string)," IRC Administrator: %s have Set %s his AdministratorLevel to: %d.",AdminName(playerid),AdminName(id),number),SendClientMessageToAll(YELLOW,string); Info[id][AdminLevel]=number,SendCommandMsg(playerid,"setadminlevel"); return SetInfo(id,"AdminLevel",number); }