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;
}