Admins Command
#3

pawn Код:
dcmd_admins(playerid,params[])
{
    #pragma unused params
    new count, bool:online;
    new string[128], AdmRank[64];
    for(new i,g=GetMaxPlayers(); i < g; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(1 <= PlayerInfo[i][Level] <= 6)
            {
                online = true;
                if(IsPlayerAdmin(i)) AdmRank = "Rcon Administrator";
                switch(PlayerInfo[i][Level])
                {
                    case 1: AdmRank = "VIP";
                    case 2: AdmRank = "Co-Mod";
                    case 3: AdmRank = "Mod";
                    case 4: AdmRank = "Admin";
                    case 5: AdmRank = "Leader";
                    case 6: AdmRank = "Manager";
                }
                format(string,sizeof(string), "%s %s [%s], ",string,PlayerName2(i),AdmRank);
                count++;
                if(count == 3)
                {
                    format(string,sizeof(string),"Admins: %s",string);
                    SendClientMessage(playerid, blue, string);
                    string = "";
                    count = 0;
                }
            }
        }
    }
    if(count)
    {
        format(string,sizeof(string),"Admins: %s",string);
        SendClientMessage(playerid, blue, string);
    }
    if(!online) SendClientMessage(playerid,red,"No admin online in the list");
    return 1;
}
Reply


Messages In This Thread
Admins Command - by HyperZ - 31.12.2010, 08:22
Re: Admins Command - by jameskmonger - 31.12.2010, 08:27
Re: Admins Command - by MadeMan - 31.12.2010, 08:34

Forum Jump:


Users browsing this thread: 1 Guest(s)