04.11.2011, 23:21
Hello,
I tryed to make a command for IRC to view a list of all current ingame admins. It works fine so far, the only problem is that it echoes every admin twice.
When I type the command on IRC this line is getting echoed twice:
Any idea how to fix that ?
I tryed to make a command for IRC to view a list of all current ingame admins. It works fine so far, the only problem is that it echoes every admin twice.
Код:
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) { format(string, sizeof(string), "Level: %d - %s (Id:%i)",AccInfo[i][Level], PlayerName2(i),i); IRC_GroupSay(gGroupID, channel, string); count++; } } if (count == 0) format(string, sizeof(string), "There are currently no admins online."); IRC_GroupSay(gGroupID, channel, string); return 1; }
Код:
format(string, sizeof(string), "Level: %d - %s (Id:%i)",AccInfo[i][Level], PlayerName2(i),i); IRC_GroupSay(gGroupID, channel, string);