How to get players ID's ?
#1

pawn Код:
irccmd_players(conn, channel[], user[], params[]) //made by Grove, taken from CYS Echo Bot 1.2
{
    new count, PlayerNames[512], string[256];
    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),"2%s1",PlayerName1);
                count++;
            }
            else
            {
                new PlayerName1[MAX_PLAYER_NAME];
                GetPlayerName(i, PlayerName1, sizeof(PlayerName1));
                format(PlayerNames, sizeof(PlayerNames),"%s, 2%s1", PlayerNames, PlayerName1);
                count++;
            }
        }
        else { if(count == 0) format(PlayerNames, sizeof(PlayerNames), "1No Players Online!"); }
    }

    new counter = 0;
    for(new i=0; i<=MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i)) counter++;
    }

    format(string, 256, "6Connected Players[%d]:1 %s", counter, PlayerNames);
    ircSay(conn, channel, string);
    #pragma unused params,user
    return true;
}
I'm using Jacob's filterscript, and i have no clue how to get Players ID's after theyre names, when i do in irc "!players".
Reply


Messages In This Thread
How to get players ID's ? - by ДitisOnHuora - 16.02.2010, 12:55
Re: How to get players ID's ? - by ДitisOnHuora - 16.02.2010, 15:44
Re: How to get players ID's ? - by VonLeeuwen - 16.02.2010, 16:52

Forum Jump:


Users browsing this thread: 1 Guest(s)