HelpTelekill/OPK, how does it work?

Posts 16–18 of 18 · Page 2 of 2
Quote Originally Posted by Flengo View Post
Here's a horrible example I found online and made a little neater. Its so you just get the idea of what to do please don't use this

Code:
void DoTelekill(int TeleKill)
{
	DWORD posptr, posy;
	GetPlayerByIndex = (lpGetPlayerByIndex)PlayerByIndex;
	unsigned long ulThis = *(unsigned long *)ClientInfoMgr;
	GetLocalPlayer = (lpGetLocalPlayer)LocalPlayer;


	posptr = (DWORD)GetModuleHandle("ClientFX.fxd");
	posptr += ADDR_CLIENTFX;


	memcpy(&posy,(void *)posptr, 4);


	for(int i = 0; i < 16; i++) 
	{
		PlayerInfo *pPlayer = GetPlayerByIndex(ulThis, i, 0);
		PlayerInfo *pLocal = GetLocalPlayer(ulThis);


		if(pPlayer != 0 && pPlayer->obj != 0 && pPlayer->IsDead == 0) 
		{
			if(TeleKill) 
			{
				if(pPlayer->Team != pLocal->Team) 
				{
					*(float *)(posy + 0xC8) = (pPlayer->obj->origin.x + 100.0f);
					*(float *)(posy + 0xCC) = (pPlayer->obj->origin.y + 100.0f);
					*(float *)(posy + 0xD0) = (pPlayer->obj->origin.z);
				}
			}
		}
	}
}

But u know its working right ?
Quote Originally Posted by R3d_L1n3 View Post
But u know its working right ?
Yeah I know it works. But there's just some unneeded things in there, plus its leeched around everywhere.

Just trying to give better guidelines than him leeching from the start.
Addies for GetLocalPlayer and GetPlayerByIndex:

#define ADDR_GETLOCALPLAYER 0x372CC400 //CShell.dll[0x37100000] + 0x001CC400

#define ADDR_GETPLAYERBYINDEX 0x372CBA10 //CShell.dll[0x37100000] + 0x001CBA10

hopefully that will help a little bit ^
Posts 16–18 of 18 · Page 2 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us