/admins problems :\
#5

Shouldn't you want to be creating the 2 strings outside the loop? Or it'll be creating the same string every time an admin is detected..
pawn Код:
CMD:admins(playerid, params[])
{
    new bool:Count;
    new str[45], Admin[MAX_PLAYER_NAME];
    for(new i, j = GetMaxPlayers(); i != j; i++)
    {
        if(PlayerInfo[i][pAdmin] > 0)
        {
            GetPlayerName(i, Admin, MAX_PLAYER_NAME);
           
            format(str, sizeof(str), "[Admin]'%s - level %d", Admin, PlayerInfo[i][pAdmin]);
            SendClientMessage(playerid, lightred, str);
            Count = true;
        }
    }        

    if(!Count) SendClientMessage(playerid, lightred, "[System]: No Admin Online!");
    return 1;
}
Reply


Messages In This Thread
/admins problems :\ - by Devilxz97 - 27.11.2012, 11:57
Re: /admins problems :\ - by tyler12 - 27.11.2012, 11:59
Re: /admins problems :\ - by Devilxz97 - 27.11.2012, 12:00
Re: /admins problems :\ - by ViniBorn - 27.11.2012, 12:04
Re: /admins problems :\ - by CentyPoo - 27.11.2012, 12:27
Re: /admins problems :\ - by tyler12 - 27.11.2012, 12:32
Re: /admins problems :\ - by CentyPoo - 27.11.2012, 12:34

Forum Jump:


Users browsing this thread: 3 Guest(s)