ExclamationIsPlayerNear Function

Posts 115 of 23 · Page 1 of 2
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
Quote Originally Posted by NOOB View Post
[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
Quote Originally Posted by Nubzgetkillz View Post
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.
Quote Originally Posted by NOOB View Post


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?
Quote Originally Posted by NOOB View Post


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");
}
Quote Originally Posted by CAFlames View Post


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 )"

I'll put up a video using this function + telekill.
Quote Originally Posted by NOOB View Post
I'll put up a video using this function + telekill.
NOOB may I have your msn?
This time can you add me
What Hack Is This... ?
Is A Teleporter...?
...
Do this for grenade = win
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
Quote Originally Posted by kotentopf View Post
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]
Quote Originally Posted by NOOB View Post


[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
PSEUDO, not C+P READY!
Learn C++ if u want to use it


You can see that I only teleport to enemies who come close to me.
Quote Originally Posted by NOOB View Post
That looks very nice.
How do you get your telekill to be so smooth? and Can I have de msn of yours?
Posts 115 of 23 · Page 1 of 2
This thread is closed for replies.

Tags for this Thread

None

Need help?