That code is not complete for making chams, if you really want a complete one you need to find a source and learn it. That code is only for people that can implement the snippets into a fully working DLL that works for chams.
Press insert to toggle on and off. Please note the strides and the player definition is fake, so you must find the real Player definitions.
Code:
UINT Stride;
UINT NumVertices;
UINT PrimitiveCount;
#define Player (Stride == 44 || Stride == 20 || NumVertices == 200 || PrimitiveCount == 30);
//NOTE, these are Fake Strides.
//You will have to use the Game Specific ones for the game you are planning to 'hack'
bool chams = false;
LPDIRECT3DVERTEXBUFFER8 Stream_Data;
UINT Stride = 0;
if (m_pD3DDev->GetStreamSource(0, &Stream_Data, &Stride) == D3D_OK)
Stream_Data->Release();
if (GetAsyncKeyState (VK_INSERT)&1)
{
Chams = !Chams
}
if(Chams)
if(Player)
{
{
//If the player stride is active.
DrawIndexedPrimitive(Device, Type, MinIndex, NumVertices, StartIndex, PrimitiveCount);
//If it's behind the wall, then fill it with Green
Device->SetRenderState( D3DRS_ZENABLE,false );
Device->SetTexture( 0, texGreen );
//and then disable the Z Axis buffer, and bring them to the front.
DrawIndexedPrimitive(Device, Type, MinIndex, NumVertices, StartIndex, PrimitiveCount);
//if the player is in front of the wall
Device->SetRenderState( D3DRS_ZENABLE, true );
//turn the Z Buffer back on, and then fill the playermodel with blue
Device->SetTexture( 0, texBlue);
DrawIndexedPrimitive(Device, Type, MinIndex, NumVertices, StartIndex, PrimitiveCount);
}
}