/playerlist Only one players shows up ;/
#14

Quote:
Originally Posted by BigETI
Посмотреть сообщение
I gonna clear up these things:
pawn Код:
if(!strcmp(cmdtext, "/testing", true))
{
    new bool:check = false, lol[1024] = "* ";
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && IsPlayerNPC(i)) //You can add here another checks later.
        {
            new name[MAX_PLAYER_NAME];
            GetPlayerName(i, name, sizeof(name));
            if(!check)
            {
                format(lol, sizeof(lol), "{FFFFFF}%s {64B500}%s", lol, name);
                state = true;
            }
            else format(lol, sizeof(lol),"%s, %s", lol, name);
        }
    }
    if(check) ShowPlayerDialog(playerid, 100, DIALOG_STYLE_MSGBOX, "{64B500}Online:", lol, "OK", "Exit");
    else ShowPlayerDialog(playerid, 100, DIALOG_STYLE_MSGBOX, "{64B500}Online:", "{FF0000}Nobody", "OK", "Exit");
    return 1;
}
No need to do all this.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)