[Release] Admincount at who command

Newbie Spellweaver
Joined
Jun 21, 2006
Messages
74
Reaction score
2
ok i made the code for the admincount, ull need to decompile your worldserver.exe,for decompiling and compiling there is a tut already on here.

open up gmcmds, search who

replace this :

Code:
else if(strcmp(command, "who")==0) 
    {
        if(Config.Command_Who > thisclient->Session->accesslevel)
            return true;
        int count=1;
        int gmcount=0;
        int playercount=0;
        char line0[200];
        while(count <= (ClientList.size()-1)) 
        {
            CPlayer* whoclient = (CPlayer*)ClientList.at(count)->player;
            if(whoclient->isInvisibleMode != true) 
            {
                    if(whoclient->Session->accesslevel > 100) 
                    {
                        gmcount++;                                      
                    } 
                    else 
                    {
                        playercount++;
                    }
            }
            count++;
        }
        sprintf(line0, "There are currently %i players and %i game moderators currently connected.", playercount, gmcount);
        Log( MSG_GMACTION, " %s : /who" , thisclient->CharInfo->charname);
        SendPM(thisclient, line0 );
        return true;                                              
    }

with this :

Code:
else if(strcmp(command, "who")==0) 
    {
        if(Config.Command_Who > thisclient->Session->accesslevel)
            return true;
        int count=1;
        int gmcount=0;
        int playercount=0;
        int admincount=0;
        char line0[200];
        while(count <= (ClientList.size()-1)) 
        {
            CPlayer* whoclient = (CPlayer*)ClientList.at(count)->player;
            if(whoclient->isInvisibleMode != true) 
            {
                    if(whoclient->Session->accesslevel > 100) 
                    {
                        gmcount++;                                      
                    } 
                    else if(whoclient->Session->accesslevel > 300) 
                    {
                        admincount++;
                    }
                    else
                    {
                    playercount++;
                    }
            }
            count++;
        }
sprintf(line0, "There are currently %i players, %i administrators %i game moderators currently connected.", playercount,admincount, gmcount);
        Log( MSG_GMACTION, " %s : /who" , thisclient->CharInfo->charname);
        SendPM(thisclient, line0 );
        return true;                                              
    }


compile it to an exe again.
then change the admin's acceslevel to anything above 300..

credits go to me. do not steal, pm me if u want to post this on other forums!
 
whats the point you prolly would have the admin on your list same with gm i like the command tho and everyone can use who2 on my server :P
 
Back