Please help
#2

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;
}
Reply


Messages In This Thread
Please help - by Hoss - 24.08.2011, 09:48
Re: Please help - by Tigerbeast11 - 24.08.2011, 09:50

Forum Jump:


Users browsing this thread: 1 Guest(s)