why it shows only 1 admin ;(
#4

Try this:
pawn Код:
CMD:ksadmins(playerid,params[])
{
    new Count=0,Name[MAX_PLAYER_NAME],string[128],AdmRank,ChangeColor;
    SendClientMessage(playerid, green, " ");
    SendClientMessage(playerid, blue, "___________ |- Online KS Members -| ___________");
    SendClientMessage(playerid, green, " ");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][KsLevel] > 0 && IsPlayerConnected(i))
        {
            switch(PlayerInfo[i][KsLevel])
            {
                case 1:
                {
                    AdmRank = "Newest Member";
                    ChangeColor = blue;
                }
                case 2:
                {
                    AdmRank = "Junior Member";
                    ChangeColor = blue;
                }
                case 3:
                {
                    AdmRank = "Executive Member";
                    ChangeColor = blue;
                }
                case 4:
                {
                    AdmRank = "Senior Member";
                    ChangeColor = blue;
                }
                case 5:
                {
                    AdmRank = "Head Member";
                    ChangeColor = blue;
                }
                case 6:
                {
                    AdmRank = "Lieutenant";
                    ChangeColor = blue;
                }
                case 7:
                {
                    AdmRank = "General";
                    ChangeColor = blue;
                }
                case 8:
                {
                    AdmRank = "Leader";
                    ChangeColor = red;
                }
            }
            GetPlayerName(i,Name,sizeof(Name));
            format(string, 128, "Rank: %d - %s (Id:%i) | %s |", PlayerInfo[i][KsLevel], Name, i, AdmRank);
            SendClientMessage(playerid, ChangeColor, string);
            Count++;
        }
    }
    if(Count == 0)
    {
        SendClientMessage(playerid, red, "No online KS members");
        return 1;
    }
    SendClientMessage(playerid, blue, " _______________________________________");
    return 1;
}
Reply


Messages In This Thread
why it shows only 1 admin ;( - by KillerStrike23 - 17.04.2014, 21:52
Re: why it shows only 1 admin ;( - by PrivatioBoni - 17.04.2014, 21:54
Re: why it shows only 1 admin ;( - by KillerStrike23 - 17.04.2014, 21:55
Re: why it shows only 1 admin ;( - by awsomedude - 17.04.2014, 22:05
Re: why it shows only 1 admin ;( - by gtakillerIV - 17.04.2014, 22:08
Re: why it shows only 1 admin ;( - by KillerStrike23 - 17.04.2014, 22:09
Re: why it shows only 1 admin ;( - by awsomedude - 17.04.2014, 22:10
Re: why it shows only 1 admin ;( - by KillerStrike23 - 17.04.2014, 22:12
Re: why it shows only 1 admin ;( - by awsomedude - 17.04.2014, 22:14
Re: why it shows only 1 admin ;( - by KillerStrike23 - 18.04.2014, 07:59

Forum Jump:


Users browsing this thread: 2 Guest(s)