1. ## IsPlayerNear Function

[HIGHLIGHT=C++]bool IsPlayerNear( D3DXVECTOR3 Pos )
{
float distance = 300.0f;
DWORD dwClientFxEntry = (DWORD)GetModuleHandle( "Clientfx.fxd" );
DWORD dwClass = *(DWORD*)( dwClientFxEntry + 0x66F34 );

if( abs(Pos.x - *(float*)( dwClass + 0xC8 )) < distance
&& abs(Pos.y - *(float*)( dwClass + 0xCC ) < distance )
&& abs(Pos.z - *(float*)( dwClass + 0xD0 ) < distance ) )
return true;
else
return false;
}[/HIGHLIGHT]

Code:
```ᴺᴼᴼᴮ
Gellin```

2. ## The Following 2 Users Say Thank You to NOOB For This Useful Post:

[MPGH]Flengo (03-04-2011),Nubzgetkillz (02-19-2011)

3. Originally Posted by ᴺᴼᴼᴮ
[HIGHLIGHT=C++]bool IsPlayerNear( D3DXVECTOR3 Pos )
{
float distance = 300.0f;
DWORD dwClientFxEntry = (DWORD)GetModuleHandle( "Clientfx.fxd" );
DWORD dwClass = *(DWORD*)( dwClientFxEntry + 0x66F34 );

if( abs(Pos.x - *(float*)( dwClass + 0xC8 )) < distance
&& abs(Pos.y - *(float*)( dwClass + 0xCC ) < distance )
&& abs(Pos.z - *(float*)( dwClass + 0xD0 ) < distance ) )
return true;
else
return false;
}[/HIGHLIGHT]

Code:
```ᴺᴼᴼᴮ
Gellin```
what does this do?
float distance = 300.0f; so distance is 300 pixels
if( abs(Pos.x - *(float*)( dwClass + 0xC8 )) < distance
&& abs(Pos.y - *(float*)( dwClass + 0xCC ) < distance )
&& abs(Pos.z - *(float*)( dwClass + 0xD0 ) < distance ) )

so all that shit is less than( < ) distance!
I get it nao

4. What Hack Is This... ?
Is A Teleporter...?
...

5. Originally Posted by Nubzgetkillz
what does this do?
float distance = 300.0f; so distance is 300 pixels
if( abs(Pos.x - *(float*)( dwClass + 0xC8 )) < distance
&& abs(Pos.y - *(float*)( dwClass + 0xCC ) < distance )
&& abs(Pos.z - *(float*)( dwClass + 0xD0 ) < distance ) )

so all that shit is less than( < ) distance!
I get it nao
It makes an invisible force field vortex (covering a volume of 113,097,336 units if distance = 300) around your character. If the object you put into the function enters within your magical votex, then it will return true. Could be used to alert the hack user if an enemy is close to them or if a grenade is close to them.

6. Originally Posted by ᴺᴼᴼᴮ

It makes an invisible force field vortex (covering a volume of 113,097,336 units if distance = 300) around your character. If the object you put into the function enters within your magical votex, then it will return true. Could be used to alert the hack user if an enemy is close to them or if a grenade is close to them.
That vortex can be used to create very obscure and spectacular hacks for use in Combat Arms. This Function is a similar to what I have done in this picture here:

Mine I created an invisible sphere with 10 M( My language)
If someone of the opposite team were to step into your bubble you would be prompted to attack.

Example with different method:
Code:
```float FindDistance(D3DXVECTOR3 my,D3DXVECTOR3 other)
{
return sqrt(origin.x-eorigin.x)*(origin.x-eorigin.x) + (origin.y-eorigin.y)*origin.y-eorigin.y) + (origin.z-eorigin.z)*(origin.z-eorigin.z));
}```
origin = you, eorigin = enemy

[highlight=c++]
if(FindDistance(origin,eorigin) < 300){
SendTextWarning("GO ATTACK THEY HAVE INFILTRATED ARE TERRITORY!");
}
[/highlight]

Would you like to give an example on how to use your IsPlayerNear function?

7. Originally Posted by ᴺᴼᴼᴮ

It makes an invisible force field vortex (covering a volume of 113,097,336 units if distance = 300) around your character. If the object you put into the function enters within your magical votex, then it will return true. Could be used to alert the hack user if an enemy is close to them or if a grenade is close to them.
Yeh, so If you want to add a string to say "Enemy is in Vortex".

Just do

Code:
```if (IsPlayerNear){
DrawString(CenterX, CenterY, Red, "Times New Roman", "Enemy is in Vortex");
}```

8. Do this for grenade = win

9. Originally Posted by CAFlames

Yeh, so If you want to add a string to say "Enemy is in Vortex".

Just do

Code:
```if (IsPlayerNear){
DrawString(CenterX, CenterY, Red, "Times New Roman", "Enemy is in Vortex");
}```
Function does not take 0 arguments.

"bool IsPlayerNear( D3DXVECTOR3 Pos )"

10. I'll put up a video using this function + telekill.

11. Originally Posted by ᴺᴼᴼᴮ
I'll put up a video using this function + telekill.
NOOB may I have your msn?
This time can you add me

12. u must not use the position pointer
u can also use the Camera pointer or the position info pointer in the playerinfo class or in the FXClass

13. Originally Posted by kotentopf
u must not use the position pointer
u can also use the Camera pointer or the position info pointer in the playerinfo class or in the FXClass
[HIGHLIGHT=C++]IsPlayerNear(pPlayer->obj->origin)[/HIGHLIGHT]

14. Originally Posted by ᴺᴼᴼᴮ

[HIGHLIGHT=C++]IsPlayerNear(pPlayer->obj->origin)[/HIGHLIGHT]
i mean

Code:
```DWORD dwClientFxEntry = (DWORD)GetModuleHandle( "Clientfx.fxd" );
DWORD dwClass = *(DWORD*)( dwClientFxEntry + 0x66F34 );```
u can remove this for CameraPoition or
Code:
```PlayerInfo *pMe = GetMyPlayer();
pMe->obj->origin```