dialog help/
#1

How can I make a /members command in Dialog?

It will show the online players in green names, and offline players in white?

Please help.

pawn Code:
command(members, playerid, params[])
{
    //rest here
}
Reply
#2

pawn Code:
COMMAND:members( playerid, params[ ] )
{
    foreach (Player, i)
    {
        if ( gTeam[ i ] == gTeam[ playerid ] )
        {
            new name[ 24 ] = "No one";
            if ( i != playerid ) {
            GetPlayerName( i, 24 ); } new output[ 64 ], totalstr[ 1024 ]; }
            format( output, 64, "{00FF00}%s\n", name );
            strcat( totalstr, output );
        }
    }
 
    ShowPlayerDialog( playerid, 1337, DIALOG_STYLE_MSGBOX, "ONLINE MEMBERS", totalstr, "okay", "" );

    return 1;
}
p.s.: this one i created is without offline members.

Hope it works and helps.
Reply
#3

Thanks mate, I'll have a peek.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)