PHP код:
if (strcmp("/cmd", cmdtext, true) == 0)
{
new string[128],string1[128],string2[128],string3[128],pl,name[24];
while(pl < MAX_PLAYERS)
{
GetPlayerName(pl,name,24);
if(strcmp(name,"name1",true) == 0)
{
format(string1, 128, " {00FF00}Online {FFFFFF}name1");
}
else
{
format(string1, 128, " {FF0000}Offline {FFFFFF}name1");
}
if(strcmp(name,"name2",true) == 0)
{
format(string2, 128, " {00FF00}Online {FFFFFF}name2");
}
else
{
format(string2, 128, " {FF0000}Offline {FFFFFF}name2");
}
if(strcmp(name,"name3",true) == 0)
{
format(string3, 128, " {00FF00}Online {FFFFFF}name3");
}
else
{
format(string3, 128, " {FF0000}Offline {FFFFFF}name3");
}
pl++;
}
format(string, 128, "%s\n%s\n%s\n", string1,string2,string3);
ShowPlayerDialog(playerid,0, DIALOG_STYLE_MSGBOX, "admins",string, "Ok","");
return 1;
}