View Single Post
Getting the enemy's weapon-help plz
Old
  (#1)
noGrip
Member
 
Status: Offline
Posts: 2
Join Date: Jun 2006
Default Getting the enemy's weapon-help plz - 10-06-2006

Hi all,

I'm trying to build a bot for counter-strike 1.6. I want to know what weapon the bot's sighted enemy is using. For that I'm using the entvars_s structure. I do something like this (short version):

Code:
//What enemies do i see?
edict_t** visibleEnemies = vision->seeEnemies();
edict_t* targetEnemy = visibleEnemies[0];
if(targetEnemy->v.weaponmodel == ???)
{
     //do something about it
}
The ??? is what I want to know... I know it is an integer, but I have spent the last hours trying to find the match between that integer and the weapon. Does anyone know where it is? Or if it is another way of detecting the enemy's weapon?

Thanks,

Paulo
  
Reply With Quote