admins dialog
#2

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;
}
Hopefully something like this should work, I didn't test it but it will give you a fair idea on how it works.

Goodluck!
Reply


Messages In This Thread
admins dialog - by kvsolga - 07.06.2011, 22:18
Re: admins dialog - by Haydz - 07.06.2011, 22:28
Re: admins dialog - by MBX97 - 08.06.2011, 15:24
Re: admins dialog - by kvsolga - 08.06.2011, 17:36
Re: admins dialog - by kvsolga - 08.06.2011, 20:26

Forum Jump:


Users browsing this thread: 1 Guest(s)