04.11.2011, 23:28
pawn Код:
IRCCMD:admins(botid, channel[], user[], host[], params[])
{
#pragma unused params
new count = 0;
new string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && AccInfo[i][Level] >= 3 && AccInfo[i][Hide] == 0)
{
count++;
break;
}
}
if (count == 0) {
IRC_GroupSay(gGroupID, channel, "There are currently no admins online.");
}
else
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && AccInfo[i][Level] >= 3 && AccInfo[i][Hide] == 0)
{
format(string, sizeof(string), "Level: %d - %s (Id:%i)",AccInfo[i][Level], PlayerName2(i),i);
IRC_GroupSay(gGroupID, channel, string);
}
}
}
return 1;
}