SA-MP Forums Archive
another irc cmd problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: another irc cmd problem (/showthread.php?tid=109653)



another irc cmd problem - [HKS]dlegend - 21.11.2009

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

Код:
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);
}