一 client.cpp中加:
void func_id() {
int id = cmd.argI(1);
vPlayers[id].isenemy = true;
Con_Echo("Add %s to the enemylist",vPlayers[id].entinfo.name);
}
void func_rd()
{
int id = cmd.argI(1);
vPlayers[id].isenemy = false;
Con_Echo("Delete %s form the enemylist",vPlayers[id].entinfo.name);
}
void func_delall()
{
int x = 0;
while (x < 33) {
vPlayers[x].isenemy = false;
x++;
Con_Echo("Clear the enemylist");
}
}
void func_enemylist()
{
int x = 0;
while (x < 33) {
if (vPlayers[x].isenemy == true) {
Con_Echo("enemy: id=%x name=%s",x,vPlayers[x].entinfo.name);
}
x++;
}
}
void func_playerlist()
{
int x = 1;
while (x < 32) {
if (vPlayers[x].team > 0 ) {
Con_Echo("id=%d team=%x name=%s",x,vPlayers[x].team,vPlayers[x].entinfo.name);
}
x++;
}
}
———————————————————————
二 client.cpp中,Init_Command_Interpreter()下面加
REGISTER_COMMAND(playerlist )
REGISTER_COMMAND(enemylist )
REGISTER_COMMAND(id )
REGISTER_COMMAND(rd )
REGISTER_COMMAND(delall )
————————————————————————
三 aimbot.cpp中的void OriginAimbot::FindTarget()下面加入
case 2:
if( vPlayers[ax].visible && !vPlayers[target].visible )
{
target = ax;
break;
}
if( vPlayers[ax].isenemy == true )
{
target = ax;
break;
}
break;
————————————————————————
四 client.h中
1 在class PlayerInfo中的alive=false;的下面加入
isenemy = false;
2 在hud_player_info_t entinfo;的下面加入
bool isenemy;
——————————————————
完成.