28.11.2010, 10:36
Hello, I have this code in my irc script:
And in IRC it shows like this:
But how can i change the order so it shows like this instead?
So it gets ordered by the player id.
Thanks in advance, ~Hannes
pawn Код:
IRCCMD:players(botid, channel[], user[], host[], params[])
{
if(IRC_IsHalfop(botid, channel, user))
{
for(new i=0; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
new msg[128], name[24], ip[16];
GetPlayerName(i, name, 24);
GetPlayerIp(i, ip, 16);
format(msg, sizeof(msg), "[%d] %s (%s)", i, name, ip);
IRC_GroupSay(gGroupID, channel, msg);
}
}
}
return 1;
}
pawn Код:
<Bot1> [1] [NWA]Hannes (127.0.0.1)
<Bot2> [0] Michael (127.0.0.1) //This is a NPC i have.
pawn Код:
<Bot1> [0] Michael (127.0.0.1) //This is a NPC i have.
<Bot2> [1] [NWA]Hannes (127.0.0.1)
Thanks in advance, ~Hannes