[Help] /admins problem
#2

First off, stop spacing out your code like that, it looks like complete shit and anyone who wants to help you will be appalled by this.

Second, why were you sending the message to the admins? If you did /admins, it would send the message to the admins that are online.

Fixed:

pawn Код:
if(strcmp(cmd, "/admins", true) == 0)
{
    new str[128], playeramount = 0;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(Stats[i][AdminLvl] > 0 && IsPlayerConnected(i))
        {
            new name[90];
            GetPlayerName(i,name,sizeof(name));
            format(str,sizeof(str),"%s(id:%d) [Level: %d] is Online.",name,i);
            SendClientMessage(playerid,COLOR_BLUE,str);
            playeramount ++;
        }
        if(playeramount == 0) return SendClientMessage(playerid,COLOR_BLUE,"No admins are on!");
    }
    return 1;
}
Reply


Messages In This Thread
[Help] /admins problem - by mickos - 01.08.2012, 17:55
Re: [Help] /admins problem - by Kindred - 01.08.2012, 18:03
Re: [Help] /admins problem - by mickos - 01.08.2012, 18:08
Re: [Help] /admins problem - by Kindred - 01.08.2012, 18:15
Re: [Help] /admins problem - by mickos - 01.08.2012, 18:24

Forum Jump:


Users browsing this thread: 2 Guest(s)