I created the exact same command for my CoD4 mod, heres what I used:
PHP Code:
case "admins":
thread checkForAdmins();
break;
Called upon function:
PHP Code:
checkForAdmins()
{
string = "";
players = getentarray( "player", "classname" );
for( i = 0; i < players.size; i++ )
{
if(!isDefined(players[i].masked))
players[i].masked = 0;
if(!isDefined(players[i].mask))
players[i].mask = players[i] getPower();
players[i].rank = "";
if(int(players[i].masked) == 1)
{
players[i].rank = players[i].mask;
}
if( players[i].rank >= 10) //If the players rank is above 10 they are classified as an admin
{
if(int(players[i].masked) != 1)
players[i].rank
if(int(players[i].mask) != 0 || int(players[i].mask) != 1)
string = string + players[i].name + " ^3[^7" + players[i].rank + "^3], ^7";
}
}
exec( "say Admins online: " + string );
//iPrintLnBold( string );
}