Admin Rank
#3

pawn Код:
new
    tmp[64],
    string[128];

for(new i = 0; i < MAX_PLAYERS; i++)
{
    if (IsPlayerConnected(i))
    {
        if(1 <= PlayerInfo[i][Level] <= 5)
        {
            if(IsPlayerAdmin(playerid)) AdmRank = "RCON Administrator";
           
            else
            switch(PlayerInfo[i][Level])
            {
                case 1: AdmRank = "Basic Moderator";
                case 2: AdmRank = "Moderator";
                case 3: AdmRank = "Mod";
                case 4: AdmRank = "Admin";
                case 5: AdmRank = "Owner";
            }

            format(tmp, sizeof(tmp), "%s [%s], ",PlayerName2(i), AdmRank)
            strcat(string, tmp);

            if ((i % 3) == 0) // This will print 3 names on one line and then move on to the next line
            {
                SendClientMessage(playerid, blue, string);
                string[0] = EOS;

                // Note: EOS = End Of String = '\0'
                // It empties the string (so to say)
                // This is needed for strcat to work correctly
            }
            count++;
        }
    }
}
Reply


Messages In This Thread
Admin Rank - by Linus- - 23.11.2010, 14:01
Re: Admin Rank - by Zh3r0 - 23.11.2010, 14:05
Re: Admin Rank - by Vince - 23.11.2010, 14:16
Re: Admin Rank - by Linus- - 23.11.2010, 14:18
Re: Admin Rank - by Jefff - 23.11.2010, 14:21

Forum Jump:


Users browsing this thread: 1 Guest(s)