need help with /admins
#3

You could do it like this:

pawn Код:
COMMAND:admins(playerid, params[])
{
    new count = 1, name[24], string[128];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && IsPlayerAdmin(i))
        {
            GetPlayerName(i, name, sizeof(name));
            format(string, sizeof(string), "%s%s \n", string, name);
            count ++;
        }
    }
   
    if(count != 1)
    {
        ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX, "Online Admins", string, "OK", "");
    }
    else ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX, "[!] Online Admins", "No online admins", "OK", "");
}
I've decided to use a dialog box here.

This is in Zcmd, if you aren't using Zcmd then convert it to your desired choice.
Reply


Messages In This Thread
need help with /admins - by Torus - 11.05.2012, 15:17
Re: need help with /admins - by iGetty - 11.05.2012, 15:19
Re: need help with /admins - by TheDominator - 11.05.2012, 15:22
Re: need help with /admins - by Torus - 11.05.2012, 15:22
Re: need help with /admins - by Torus - 11.05.2012, 15:31
Re: need help with /admins - by Torus - 11.05.2012, 15:42
Re: need help with /admins - by Yuryfury - 11.05.2012, 15:59
Re: need help with /admins - by TheDominator - 11.05.2012, 16:01
Re: need help with /admins - by Torus - 11.05.2012, 16:01
Re: need help with /admins - by Torus - 11.05.2012, 16:03

Forum Jump:


Users browsing this thread: 1 Guest(s)