Need help with IRC command - 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: Need help with IRC command (
/showthread.php?tid=194011)
Need help with IRC command -
[NWA]Hannes - 28.11.2010
Hello, I have this code in my irc script:
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;
}
And in IRC it shows like this:
pawn Код:
<Bot1> [1] [NWA]Hannes (127.0.0.1)
<Bot2> [0] Michael (127.0.0.1) //This is a NPC i have.
But how can i change the order so it shows like this instead?
pawn Код:
<Bot1> [0] Michael (127.0.0.1) //This is a NPC i have.
<Bot2> [1] [NWA]Hannes (127.0.0.1)
So it gets ordered by the player id.
Thanks in advance, ~Hannes