Main Code
Code:
bool IntersectAndPenetrateSegment_RemtoKill(IntersectQuery* iQuery, IntersectInfo* qInfo)
{
Transform AimTransform;
cSFXMgr* SFXMgr = pGameClientShell->GetSFXMgr();
if(g_LTClient->IsConnected() && GameTools->ValidPointer(SFXMgr))
{
for( int i = 0; i <= 24; i++ )
{
cCharacterFX* FXCharacter = (cCharacterFX*)SFXMgr->SFXList[SFX_CHARACTER].List[i];
if(GameTools->ValidPointer(FXCharacter))
{
PlayerInfo* pPlayer = GetPlayerByIndex(ulThis, FXCharacter->Index, 0);
PlayerInfo* pLocal = GetLocalPlayer(ulThis);
if(GameTools->ValidPointer(pLocal) && GameTools->ValidPointer(pPlayer))
{
if(pPlayer->Index != pLocal->Index && pPlayer->Team != pLocal->Team /*&& FXCharacter->wHealth > 0*/ && pPlayer->IsDead == 0)
{
if(HakVars.RemtoeKillBone == 1)
{
g_ModelLT->GetNodeTransform(FXCharacter->Object, 8, &AimTransform, true );
AimTransform.Pos.y += 4.0f; //6.0f
}
if(HakVars.RemtoeKillBone == 2)
{
g_ModelLT->GetNodeTransform(FXCharacter->Object, 7, &AimTransform, true );
AimTransform.Pos.y += 2.0f;
}
if(Hack.RemtoeKillBone == 3)
g_ModelLT->GetNodeTransform(FXCharacter->Object, 6, &AimTransform, true );
if(HakVars.RemtoeKillBone == 4)
g_ModelLT->GetNodeTransform(FXCharacter->Object, 4, &AimTransform, true );
iQuery->Start = AimTransform.Pos + D3DXVECTOR3( 0.0f, 50.0f, 0.0f );
iQuery->End = AimTransform.Pos - D3DXVECTOR3( 0.0f, 50.0f, 0.0f );
iQuery->FilterFn = MyFilterObjects;
bool Result = g_LTClient->IntersectSegment( *iQuery, qInfo );
if( Result )
{
qInfo->hObjImpact = FXCharacter->pHitBox;
qInfo->vImpactPos = AimTransform.Pos;
}
return Result;
}
}
}
}
}
}
Fucntion Code
Code:
void Hacks::RemoteKiller()
{
if(HakVars.activateRemote)
{
if(HakVars.RemtoeKillBone > 0)
{
DWORD dwOldVProtection;
VirtualProtect( (void*) dwRemoteKill1, 5, PAGE_EXECUTE_READWRITE, &dwOldVProtection );
*(BYTE *)dwRemoteKill1 = 0xE8;
*(DWORD *)dwRemoteKill2 = ( (DWORD)IntersectAndPenetrateSegment_RemtoKill ) - ( (DWORD)dwRemoteKill2 + 0x4 );
VirtualProtect( (void*) dwRemoteKill1, 5, dwOldVProtection, &dwOldVProtection);
VirtualProtect( (void*) dwRemoteKill3, 5, PAGE_EXECUTE_READWRITE, &dwOldVProtection );
*(BYTE*)dwRemoteKill3 = 0xE8;
*(DWORD*)dwRemoteKill4 = ( (DWORD)IntersectAndPenetrateSegment_RemtoKill ) - ( (DWORD)dwRemoteKill4 + 0x4 );
VirtualProtect( (void*) dwRemoteKill3, 5, dwOldVProtection, &dwOldVProtection);
}
HakVars.RemoteKill = 0;
}
else if(HakVars.activateRemote == 0 && HakVars.RemoteKill == 0)
{
MemoryEdit((void *)dwRemoteKill1, (void *)"\x8B\x51\x64\xFF\xD2", 5);
MemoryEdit((void *)dwRemoteKill3, (void *)"\x8B\x51\x64\xFF\xD2", 5);
}
}
Enjoy Guys
Credits
Donoob/DisaV0w
Ch4zz-Coder
Gellin
MattyPatty
And Whoever invinted Remotekill