Thread: Please help
View Single Post
Old 24/08/2011, 09:50 AM   #2
Tigerbeast11
Gangsta
 
Join Date: Aug 2009
Posts: 771
Reputation: 5
Default Re: Please help

I'll give you mine from XAdmin:

pawn Code:
dcmd_admins(playerid,params[]) {
    #pragma unused params
    new Count,i,name[24],string[128];
    for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerXAdmin(i)) Count++;
    if(!Count) return SendClientMessage(playerid,green,"Admins Online: None");
    if(Count == 1) {
        for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerXAdmin(i)) break;
        GetPlayerName(i,name,24); format(string,128,"Admins Online: %s [LVL:%d] [ID:%d]",name,Variables[i][Level],i);
        return SendClientMessage(playerid,green,string);
    }
    if(Count >= 1) {
        new bool:First = false;
        for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerXAdmin(i)) {
            GetPlayerName(i,name,24);
            if(!First) { format(string,128,"Admins Online: %s [LVL:%d] [ID:%d],",name,Variables[i][Level],i); First = true; }
            else format(string,128,"%s %s [LVL:%d] [ID:%d]",string,name,Variables[i][Level],i);
        }
        return SendClientMessage(playerid,green,string);
    }
    return 1;
}
Tigerbeast11 is offline