Use CharacterFX
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.
Inside your for loop. Good luck, pretty straight forward.Code:cCharacterFX* cNPC = (cCharacterFX *)SFXMgr->SFXList[SFX_CHARACTER].List[i]; if( !pEngine->ValidPointer( cNPC ) ) continue; if( cNPC->IsPlayer ) continue;
/Solved
/Closed
I Read All Of My PM's & VM'sIf you need help with anything, just let me know.
Staff Administrator Since 10.13.2019
Publicist Since 04.04.2015
Middleman Since 04.14.2014
Global Moderator Since 08.01.2013
Premium Since 05.29.2013
Minion+ Since 04.18.2013
Combat Arms Minion Since 12.26.2012
Contributor Since 11.16.2012
Member Since 05.11.2010
pDevice (01-16-2013)