07.06.2011, 22:28
pawn Код:
command(admins,playerid,params[]) //You can change to strcmp or w/e
{
//You may need to make the longstring longer depending on how many admins you have which are usually online,
new longstring[200],shortstring[30],Count = 0,pName[25];
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerAdmin(i)) //Change this to your admin rank.
{
Count++;
GetPlayerName(i,pName,25);
format(shortstring,sizeof(shortstring),"\n%s",pName); //You could also add some more things in like there admin level. But remember to make the string length longer!
strcat(longstring,shortstring);
}
}
format(shortstring,sizeof(shortstring),"%d admins online",Count);
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_MSGBOX,"Online Admins",longstring,"Ok","");
//Change the dialogid to a number, make sure there are no dialog id's with the same number.
return 1;
}
Goodluck!

