SolvedAimbot - NPC Check problem

Posts 13 of 3 · Page 1 of 1
Aimbot - NPC Check problem
Hello guys, im wanting to ask you if you guys know, how to identify an NPC.

for now the Aimbot still works for players but how would i check it for an NPC ?
i think it's an Object ID or somethink like that:
pPlayer->obj == NPC ID ?

Code:
	for ( int i = 0; i < 16; i++ )
	{
		D3DXVECTOR3 Pos, MyPos;
		PlayerInfo* pPlayer = GetPlayerByIndex( ulThis,i,0);
		PlayerInfo* pLocal = GetLocalPlayer(ulThis);
		if(pPlayer != 0 && pPlayer->obj != 0 && pPlayer->IsDead == 0)
		{
			if(pLocal->Team != pPlayer->Team)
			{
				Pos   = MyGetObjectMaxPos((int*)pPlayer->obj);
				MyPos = MyGetObjectMaxPos((int*)pLocal->obj);

				if(((FindDistance(MyPos, Pos, pPlayer, pLocal))/10) < fNearest )
				{
					iAimAt = i;
					fNearest = (FindDistance(MyPos, Pos, pPlayer, pLocal))/10;
				}
			}
		}
	}
Use CharacterFX
In your for loop just add a conditional check to check if its an NPC or not.

Using the CharacterFX Class.

Code:
			cCharacterFX* cNPC = (cCharacterFX *)SFXMgr->SFXList[SFX_CHARACTER].List[i];


			if( !pEngine->ValidPointer( cNPC ) )
				continue;


			if( cNPC->IsPlayer )
				continue;
Inside your for loop. Good luck, pretty straight forward.

/Solved
/Closed
Posts 13 of 3 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?