IRC Bot list !players problem
#1

Hi i just a got a little problem with my irc echo bot.
If i'm doing !players , it only shows up to 12-15 players, althought there are more players on the server.
It counts all the players, but it doesn't show all the playernames.


Here is the code:

IRCCMDlayers(botid, channel[], user[], host[], params[])
{
new count, PlayerNames[512];
if(EchoStatus == 0) return 1;
for(new i=0; i<=MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(count == 0)
{
new PlayerName1[MAX_PLAYER_NAME];
GetPlayerName(i, PlayerName1, sizeof(PlayerName1));
format(PlayerNames, sizeof(PlayerNames),"[%d] %s",i,PlayerName1);
count++;
}
else
{
new PlayerName1[MAX_PLAYER_NAME];
GetPlayerName(i, PlayerName1, sizeof(PlayerName1));
format(PlayerNames, sizeof(PlayerNames),"%s, [%d] %s",PlayerNames,i,PlayerName1);
count++;
}
}
else { if(count == 0) format(PlayerNames, sizeof(PlayerNames),"No Players Online"); }
}
new counter = 0, msg[256], players = GetMaxPlayers();
for(new i=0; i<=MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) counter++;
}
format(msg,256,"10>> Players Online [%d/%d]: %s",counter,players,PlayerNames);
IRC_GroupSay(IRC_Group, EchoChan, msg);
return 1;
}




I would be pleased about some help

Greetz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)