Simple ESP & Telekill & W2S

Posts 1–15 of 15 · Page 1 of 1
Simple ESP & Telekill & W2S
Jeff helped with this shit
x10

w2s & Declarations:
Code:
typedef cPlayerInfo* (__thiscall *lpGetLocalPlayer)(DWORD ulThis);
lpGetLocalPlayer fGetLocalPlayer = lpGetLocalPlayer(Address::dwGetLocalPlayer);
cPlayerInfo* GetLocalPlayer(void) {
	return fGetLocalPlayer(*PDWORD(Address::dwClientInfo));
}

typedef cPlayerInfo* (__thiscall *lpGetPlayerByIndex)(DWORD ulThis,int index, int unk);
lpGetPlayerByIndex fGetPlayerByIndex = lpGetPlayerByIndex(Address::dwGetPlayerByIndex);
cPlayerInfo* GetPlayerByIndex(int i) {
	return fGetPlayerByIndex(*PDWORD(Address::dwClientInfo), i, 0);
}

cGameClientShell* pGameClientShell;

cSFXMgr* GetSFXMgr(void) {
	return pGameClientShell->GetSFXMgr();
}

bool ValidPointer(void* p) { 
	return !IsBadReadPtr(p, 4) && p;
}

bool WorldToScreen(D3DXVECTOR3 Pos, D3DXVECTOR3* Screen, LPDIRECT3DDEVICE9 pDevice) {

	D3DVIEWPORT9 pViewport;
	D3DXVECTOR3 dvWorld(Pos.x, Pos.y, Pos.z);
	pDevice->GetViewport(&pViewport);

	CILTDrawPrim *pDrawPrimitive = *(CILTDrawPrim**)Address::dwDrawPrim; 

	D3DXVec3Project(Screen, &dvWorld, &pViewport, &pDrawPrimitive->Projection, &pDrawPrimitive->View, &pDrawPrimitive->World);

	if(Screen->z < 1){
		return TRUE;
	}

	return FALSE;
}

Classes:
Code:
class cVector {
public:
	char _0x0000[4];
	D3DXVECTOR3 Pos; //0x0004 
	D3DXVECTOR3 Pos2; //0x0010 
};//Size=0x0040

class cPlayerInfo {
public:
	char _0x0000[4];
	__int32 iIndex; //0x0004 
	char _0x0008[12];
	char sName[12]; //0x0014 
	char _0x0020[12];
	cVector* Object; //0x002C 
	__int32 iKills; //0x0030 
	__int32 iDeaths; //0x0034 
	__int32 iHeadshots; //0x0038 
	char _0x003C[56];
	__int32 iTeam; //0x0074 
	char _0x0078[4];
	BYTE bIsDead; //0x007C 
	char _0x007D[611];
	cPlayerInfo* pNext; //0x02E0
	cPlayerInfo* pPrev; //0x02E4
};//Size=0x0444


class cSFXList {
public:
	unsigned long unk0;
	unsigned long* List;
	unsigned long unk1;
	int Num;
};

enum SFXList
{							
	SFX_EXPLOSIVE = 0x13,
	SFX_PICKUP = 0x17,
	SFX_CHARACTER = 0x18,
	SFX_DEADBODY = 0x26,
	SFX_SPOT = 0x37,
	SFX_DOOR = 0x39,
	SFX_MAX = 0x3B
};

class cSFXMgr {
public:
	cSFXList SFXList[0x3B];
};  

class cGameClientShell {
public:
	virtual void Function0();
	virtual void Function1();
	virtual void Function2();
	virtual void Function3();
	virtual void Function4();
	virtual void Function5();
	virtual void Function6();
	virtual void Function7();
	virtual void Function8();
	virtual void Function9();
	virtual void Function10();
	virtual void Function11();
	virtual void Function12();
	virtual void Function13();
	virtual void Function14();
	virtual void Function15();
	virtual void Function16();
	virtual void Function17();
	virtual void Function18();
	virtual void Function19();
	virtual void Function20();
	virtual void Function21();
	virtual void Function22();
	virtual void Function23();
	virtual void Function24();
	virtual void Function25();
	virtual void Function26();
	virtual void Function27();
	virtual void Function28();
	virtual void Function29();
	virtual void Function30();
	virtual void Function31();
	virtual void Function32();
	virtual void Function33();
	virtual void Function34();
	virtual void Function35();
	virtual void Function36();
	virtual void Function37();
	virtual void Function38();
	virtual void Function39();
	virtual void Function40();
	virtual void Function41();
	virtual void Function42();
	virtual void Function43();
	virtual void Function44();
	virtual void Function45();
	virtual void Function46();
	virtual void Function47();
	virtual void Function48();
	virtual void Function49();
	virtual void Function50();
	virtual void Function51();
	virtual void Function52();
	virtual void Function53();
	virtual void Function54();
	virtual void Function55();
	virtual void Function56();
	virtual void Function57();
	virtual void Function58();
	virtual void Function59();
	virtual void Function60();
	virtual void Function61();
	virtual void Function62();
	virtual void Function63();
	virtual cSFXMgr* GetSFXMgr(); //64
};

class cCharacterFX { 
public: 
	char    unk1[16]; 
	int*    Object;            //0x10 
	char    unk2[44]; 
	int        IsPlayer;        //0x40 
	char    unk3[40]; 
	unsigned char    Index;    //0x6C 
	char unknown112[8]; //0x0070 
	float fStartPitch; //0x0078   
	float fStartYaw; //0x007C   
	char unknown128[1224]; //0x0080 
	BYTE unk1287; //0x0548   
	bool bIsDead; //0x0549   
	bool bSpawnSheild; //0x054A   
	BYTE unk5563; //0x054B   
	char unknown1356[12]; //0x054C 
	int* hHitbox; //0x0558   
	char unknown1372[96]; //0x055C 
	WORD wUnk; //0x05BC   
	WORD wHealth; //0x05BE   
	WORD wArmor; //0x05C0   
};

class CILTDrawPrim 
{ 
public:
	virtual void function0(); // 
	virtual void function1(); // 
	virtual void function2(); // 
	virtual void function3(); // 
	virtual void function4(); // 
	virtual void function5(); // 
	virtual void function6(); // 
	virtual void function7(); // 
	virtual void function8(); // 
	virtual void function9(); // 
	virtual void SetRenderMode(int mode); 
	char unknown[16180]; //0x0004 ( 3F38 )  
	D3DVIEWPORT9 ViewPort;//433C -> 3F38 
	D3DXMATRIX World; //0x4354 -> 3F50 
	D3DXMATRIX View; //0x4394 -> 3F90 
	D3DXMATRIX Projection; //0x43D4  -> 3fD0 
};



class cWeaponInfo
{
public:
	char Unk0[12]; //0x0000
	DWORD dwClientWeaponType; //0x000C
	char Unk1[16]; //0x0010
	DWORD dwAlt_InsDamage; //0x0020
	DWORD dwInstDamage; //0x0024
	char Unk2[108]; //0x0028
	DWORD dwFireSnd; //0x0094
	char Unk3[108]; //0x0098
	float fFireDelay1; //0x0104
	float fFireDelay2; //0x0108
	DWORD dwMaxAmmo3; //0x010C
	DWORD dwMaxAmmo2; //0x0110
	char Unk4[300]; //0x0114
	BYTE bTripleShotMode; //0x0240
	char Unk5[3]; //0x0241
	DWORD dwTripleShotRoundNum; //0x0244
	float fDamageRFacter; //0x0248
	char Unk6[28]; //0x024C
	DWORD dwInfiAmmo2; //0x0268
	DWORD dwInfiniteAmmo; //0x026C
	DWORD dwHideWhenEmpty; //0x0270
	DWORD dwIsAmmo; //0x0274
	char Unk7[4]; //0x0278
	DWORD dwShotsPerClip; //0x027C
	char Unk8[52]; //0x0280
	float fZoomTime; //0x02B4
	DWORD dwMinPerturb; //0x02B8
	DWORD dwMaxPerturb; //0x02BC
	float fDuckPerturb; //0x02C0
	float fMoveDuckPerturb; //0x02C4
	DWORD dwZoomedMinPerturb; //0x02C8
	DWORD dwZoomedMaxPerturb; //0x02CC
	DWORD dwRange; //0x02D0
	char Un9[12]; //0x02D4
	DWORD dwVectorsPerRound; //0x02E0
	char Unk10[40]; //0x02E4
	float fPerturbIncSpeed; //0x030C
	float fPerturbDecSpeed; //0x0310
	char Unk11[4]; //0x0314
	float fZoomedPerturbIncSpeed; //0x0318
	float fZoomedPerturbDecSpeed; //0x031C
	char Unk12[4]; //0x0320
	float fBaseCamRecoilPitch; //0x0324
	float fBaseCamRecoilAccelPitch; //0x0328
	char Unk13[36]; //0x032C
	float fTripleShotMaxCamRecoilPitch; //0x0350
	float fTripleShotBaseCamRecoilPitch; //0x0354
	char Unk14[8]; //0x0358
	DWORD dwTripleShotMinPerturb; //0x0360
	DWORD dwTripleShotMaxPerturb; //0x0364
	float fTripleShotPerturbIncSpeed; //0x0368
	float fTripleShotPerturbDecSpeed; //0x036C
	char Unk15[156]; //0x0370
	BYTE bDisableCrosshair; //0x040C
	char Unk16[27]; //0x040D
	float fCameraSwayXFreq; //0x0428
	float fCameraSwayYFreq; //0x042C
	char Unk17[12]; //0x0430
	DWORD dwTargetCrosshairFlag; //0x043C
	DWORD dwEffectRange; //0x0440
	char Unk18[188]; //0x0444
};//Size=0x0500

class cWeaponMgr
{
public:
	char Unk0[5568]; //0x0000
	cWeaponInfo** Weapons; //0x15BC
	__int32 WeaponCount; //0x15C0
};//Size=0x15C4
doesp:
Code:
void doesp(LPDIRECT3DDEVICE9 pDevice)
{
	for(int i = 0; i <= 16; ++i)
	{
		if(!ValidPointer(GetPlayerByIndex(i)))
			continue;
		if(!ValidPointer(GetLocalPlayer()))
			continue;
		if(GetPlayerByIndex(i)->iTeam == GetLocalPlayer()->iTeam)
			continue;
		if(GetPlayerByIndex(i)->iIndex == GetLocalPlayer()->iIndex)
			continue;
		if(GetPlayerByIndex(i)->sName == NULL && GetPlayerByIndex(i)->sName == GetLocalPlayer()->sName)
			continue;
		if(GetPlayerByIndex(i)->bIsDead != 0)
			continue;

		char pName[512];
		sprintf_s(pName, "[%s]", GetPlayerByIndex(i)->sName);

		D3DXVECTOR3 xDistance = GetPlayerByIndex(i)->Object->Pos - GetLocalPlayer()->Object->Pos;
		D3DXVECTOR3 MyDistance = GetLocalPlayer()->Object->Pos - GetPlayerByIndex(i)->Object->Pos;

		float xaDistance = D3DXVec3Length(&xDistance );
		float MyaDistance = D3DXVec3Length(&MyDistance );

		D3DXVECTOR3 screen;
		if(WorldToScreen(GetPlayerByIndex(i)->Object->Pos2, &screen, d3d::pDevice))
		{
			if(Menu->stateFromIndex(3))
				d3d::DrawTextCentered((int)screen.x, (int)screen.y-7, 170, 100, d3d::RED, GetPlayerByIndex(i)->sName);

			if(Menu->stateFromIndex(4))
				d3d::DrawBorder(screen.x-(10000 / MyaDistance), screen.y-(35000 / MyaDistance), 50000 / MyaDistance / 6 * 2, 50000 / MyaDistance / 3 * 2, 2, d3d::RED);
		}
	}
}
Telekill (shitty but works )
Code:
	if(GetAsyncKeyState(VK_NUMPAD0))
	{
		DWORD PositionY, PositionPointer;
		PositionPointer = (DWORD)GetModuleHandleA(STRING_CLIENTFX);
		PositionPointer += 0x0006BF34;

		memcpy(&PositionY,(void *)PositionPointer, 4);

		for(int i=0;i<16;i++)
		{
			if(!ValidPointer(GetPlayerByIndex(i)))
				continue;
			if(!ValidPointer(GetLocalPlayer()))
				continue;
			if(GetPlayerByIndex(i)->bIsDead != 0)
				continue;

			if(GetPlayerByIndex(i)->iTeam != GetLocalPlayer()->iTeam)
			{
				*(float *)(PositionY + 0xC8) = (GetPlayerByIndex(i)->Object->Pos.x + 100.0f);
				*(float *)(PositionY + 0xCC) = (GetPlayerByIndex(i)->Object->Pos.y + 100.0f);
				*(float *)(PositionY + 0xD0) = (GetPlayerByIndex(i)->Object->Pos.z);
			}
		}
	}
all of this works very well if I'm missing something please post below
Credits:
Me
Jeff
Saltine
gellin

FUCKING CREDIT IF YOU USE
i think you need this to
class c_player//usecplayerinfo
{
public:
char unknown0[4]; //0x0000
DWORD ClientID; //0x0004
char unknown1[12]; //0x0008
char Name[20]; //0x0014
char unknown2[4]; //0x0028
__int32 *Object; //0x002C
__int32 Kills; //0x0030
__int32 Deaths; //0x0034
char unknown3[44]; //0x0038
__int32 HeadShots; //0x0064
char unknown4[12]; //0x0068
__int32 TeamID; //0x0074
char unknown5[4]; //0x0078
BYTE isDead; //0x007C
char unknown6[615]; //0x007D
c_player *Next; //0x02E4
};
Credits W11lington
and others i left out
Quote Originally Posted by juggalo200 View Post
i think you need this to

Credits W11lington
and others i left out
that is in there cPlayerInfo
also thanks to Jeff for this one:
Code:
bool WorldToScreen(Vector Pos, Vector *Screen) {
	float x = Pos.x;
	float y = Pos.y;
	float z = Pos.z;
	Vector Unk;
	_asm {
		mov ecx, dword ptr ds:[Address::dwDrawPrim]
		lea eax, Unk
			push eax
			push Screen
			push z
			push y
			push x
			mov eax, Address::dwWorldToScreen
			call eax
	}
	return (Screen->z < 1.0f);
}
Thanks for code.
I will do my best to make a amazing hacks.
Why are you using 10 different if statements....

Code:
if(!ValidPointer(GetPlayerByIndex(i)) &&  !ValidPointer(GetLocalPlayer())
{ 
  if(GetPlayerByIndex(i)->iTeam == GetLocalPlayer()->iTeam && GetPlayerByIndex(i)->iIndex == GetLocalPlayer()->iIndex && GetPlayerByIndex(i)->sName == NULL && GetPlayerByIndex(i)->sName == GetLocalPlayer()->sName && GetPlayerByIndex(i)->bIsDead != 0)
  {
     //Do the rest of your junk code here...
  }

}
Quote Originally Posted by arun823 View Post
Why are you using 10 different if statements....

Code:
if(!ValidPointer(GetPlayerByIndex(i)) &&  !ValidPointer(GetLocalPlayer())
{ 
  if(GetPlayerByIndex(i)->iTeam == GetLocalPlayer()->iTeam && GetPlayerByIndex(i)->iIndex == GetLocalPlayer()->iIndex && GetPlayerByIndex(i)->sName == NULL && GetPlayerByIndex(i)->sName == GetLocalPlayer()->sName && GetPlayerByIndex(i)->bIsDead != 0)
  {
     //Do the rest of your junk code here...
  }

}
Because its easier to read. I didn't even bother reading what you wrote, even though its the same. In this case spacing it out and checking conditions in the way done above, looks a lot neater and is easier to read.
Quote Originally Posted by Flengo View Post


Because its easier to read. I didn't even bother reading what you wrote, even though its the same. In this case spacing it out and checking conditions in the way done above, looks a lot neater and is easier to read.
Well then that depends on personal preference then, I prefer to do it in one line rather than waste space and do it over 20. Whilst simpler and the output is the same as posted, after all isn't this thread for simplicity? "Simple ESP & Telekill & W2S"
Quote Originally Posted by arun823 View Post
Well then that depends on personal preference then, I prefer to do it in one line rather than waste space and do it over 20. Whilst simpler and the output is the same as posted, after all isn't this thread for simplicity? "Simple ESP & Telekill & W2S"
I personally think from a beginners standpoint that having the lines spaced out is much easier to read and actually learn from. Rather then c+p a long line of code thats confusing to read.
Quote Originally Posted by Skaterforeva1 View Post
I personally think from a beginners standpoint that having the lines spaced out is much easier to read and actually learn from. Rather then c+p a long line of code thats confusing to read.
Beginners aren't supposed to C+P at all, they shouldn't even be in game hacking, they should be learning to code simpler programs...
Quote Originally Posted by arun823 View Post
Beginners aren't supposed to C+P at all, they shouldn't even be in game hacking, they should be learning to code simpler programs...
wat

Beginners should follow examples and C+P if needed. More towards looking at example and creating own method or way that suits them or whatever they understand.

They're not gonna magically come up with the way to create it all XD

Not like leecher level C+P but yeah, I hope you know what I mean, simply.
Quote Originally Posted by arun823 View Post
Beginners aren't supposed to C+P at all, they shouldn't even be in game hacking, they should be learning to code simpler programs...
I C+P some shitty code and try to improve it and make it more efficient and overall better. This telekill doesn't work on npc's. I have improved it by trying different things i can now use it on npc. I learned how to do it by taking a working source and looking at different examples. I wrote the rest after going threw different bases and seeing how its done. I learned how to do something. So I think im doing something right.
Quote Originally Posted by Flengo View Post


wat

Beginners should follow examples and C+P if needed. More towards looking at example and creating own method or way that suits them or whatever they understand.

They're not gonna magically come up with the way to create it all XD

Not like leecher level C+P but yeah, I hope you know what I mean, simply.
Obviously you C + P when you're a beginner at BEGINNER LEVEL coding, don't go straight to game hacking and reversing, begin from the basics and work your way up. Starting off at game hacking won't do you any good in the long run. Hopefully, you know what I mean now...


Quote Originally Posted by Skaterforeva1 View Post
I C+P some shitty code and try to improve it and make it more efficient and overall better. This telekill doesn't work on npc's. I have improved it by trying different things i can now use it on npc. I learned how to do it by taking a working source and looking at different examples. I wrote the rest after going threw different bases and seeing how its done. I learned how to do something. So I think im doing something right.
Personally in my opinion, if you start off at game hacking, how can you make it better if you don't know the basics yet, I'm not saying that you don't know the basics, but from what you're saying, I'm sure any other experienced coder will say the same, work your way up so you can build more efficient and optimized code.
There is no point in arguing about if statements. You code however you please as long as you get the same end result. As far as beginners C+ping goes, I see nothing wrong with trying out snippets released for PUBLIC use. However, using them without credits should not be acceptable.
Quote Originally Posted by arun823 View Post
Why are you using 10 different if statements....

Code:
if(!ValidPointer(GetPlayerByIndex(i)) &&  !ValidPointer(GetLocalPlayer())
{ 
  if(GetPlayerByIndex(i)->iTeam == GetLocalPlayer()->iTeam && GetPlayerByIndex(i)->iIndex == GetLocalPlayer()->iIndex && GetPlayerByIndex(i)->sName == NULL && GetPlayerByIndex(i)->sName == GetLocalPlayer()->sName && GetPlayerByIndex(i)->bIsDead != 0)
  {
     //Do the rest of your junk code here...
  }

}
I dont under stand how I use the hacks xD or put it somewhere
Quote Originally Posted by ThaAsianKidd View Post
I dont under stand how I use the hacks xD or put it somewhere
This is not a hack. This is just source code. Nothing for you here in this section. All public hacks are detected right now you you have to just wait for a release.
Posts 1–15 of 15 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us