CHams(Help)

Posts 1–6 of 6 · Page 1 of 1
CHams(Help)
I found this on google.
I know i leeched it. --' but why the creator post it on google?
so i wanna ask real coders
This code can work for Crossfire(with little changings)
Code:
DWORD dwOldZEnable = D3DZB_TRUE;
switch(chams1)
{
case 1:
	{
if (m_Stride == 44)
{

			 pDevice->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable);
             pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
		     pDevice->SetRenderState(D3DRS_LIGHTING,TRUE);
			 pDevice->SetTexture(1, Green);
             pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
			 pDevice->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable);
             pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
	 	     pDevice->SetRenderState(D3DRS_LIGHTING,FALSE);
             pDevice->SetTexture(1, Black); 
		}

}
	break;
}
Thx for feedback, dont blame on me like "leeecher" , im just learning...
its nothing special.
To let that work you need to place that in your DIP
Colours must in endscene and you must add generate texture function.

Here you ahve the generatetexture function
Code:
HRESULT GenerateTexture(IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32)
{
	if( FAILED(pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, ppD3Dtex, NULL)) )
		return E_FAIL;
	
	WORD colour16 =	((WORD)((colour32>>28)&0xF)<<12)
			|(WORD)(((colour32>>20)&0xF)<<8)
			|(WORD)(((colour32>>12)&0xF)<<4)
			|(WORD)(((colour32>>4)&0xF)<<0);

	D3DLOCKED_RECT d3dlr;    
	(*ppD3Dtex)->LockRect(0, &d3dlr, 0, 0);
	WORD *pDst16 = (WORD*)d3dlr.pBits;

	for(int xy=0; xy < 8*8; xy++)
		*pDst16++ = colour16;

	(*ppD3Dtex)->UnlockRect(0);

	return S_OK;
}



HRESULT WINAPI myEndScene (PDEVICE pDevice)
{	
	 _asm NOP;
   HRESULT hRet = pEndScene (pDevice);
if(Color)
{
GenerateTexture(pDevice, &Red, D3DCOLOR_ARGB (255,255,0 ,0 ));
GenerateTexture(pDevice, &Yellow, D3DCOLOR_ARGB (255,255,255,0 ));
GenerateTexture(pDevice, &Green, D3DCOLOR_ARGB (255,0 ,255,0 ));
GenerateTexture(pDevice, &Blue, D3DCOLOR_ARGB (255,0 ,0 ,255));
GenerateTexture(pDevice, &Purple, D3DCOLOR_ARGB (255,102,0 ,153));
GenerateTexture(pDevice, &Pink, D3DCOLOR_ARGB (255,255,20 ,147));
GenerateTexture(pDevice, &Orange, D3DCOLOR_ARGB (255,255,165,0 ));
GenerateTexture(pDevice, &Black, D3DCOLOR_ARGB (255,0 ,0 ,0 ));
GenerateTexture(pDevice, &White, D3DCOLOR_ARGB (255,255,255,255));
Color=false;
}
Right....! and the...
Code:
LPDIRECT3DTEXTURE9  texRed, texYellow, texGreen, texBlue, texOrange, texPink, texWhite;
your not a real coder....?

Quote Originally Posted by CheatCreatorzz View Post
I found this on google.
I know i leeched it. --' but why the creator post it on google?
so i wanna ask real coders
This code can work for Crossfire(with little changings)
Code:
DWORD dwOldZEnable = D3DZB_TRUE;
switch(chams1)
{
case 1:
	{
if (m_Stride == 44)
{

			 pDevice->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable);
             pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
		     pDevice->SetRenderState(D3DRS_LIGHTING,TRUE);
			 pDevice->SetTexture(1, Green);
             pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
			 pDevice->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable);
             pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
	 	     pDevice->SetRenderState(D3DRS_LIGHTING,FALSE);
             pDevice->SetTexture(1, Black); 
		}

}
	break;
}
Thx for feedback, dont blame on me like "leeecher" , im just learning...

Quote Originally Posted by Cal View Post
your not a real coder....?


Cheatz is coder
Quote Originally Posted by Cal View Post
your not a real coder....?


yeah, but i said it cuz i dont ask it too noobs(i said i ask it too real coders, so i dont need answer of fake coders or nubs ...


Quote Originally Posted by Ryuesi View Post

Cheatz is coder
come on msn!
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us