Hello all,I need help with my Chams after learning how to make in from some tuts.

Code:

LPDIRECT3DVERTEXBUFFER8 Stream_Data;
UINT Stride = 0;

if (m_pD3DDev->GetStreamSource(0, &Stream_Data, &Stride) == D3D_OK)
Stream_Data->Release();

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);
}
}

Edit: Oh yeah,Please give me the full code with/without menu(If that code has the menu remember to give me this (GetAnsycKeyState(VK_SHIFT)&1); im not begging just want to learn how to code.
And if you give me the full code please Explain it IN FULL DETAILS
----------
Thanks----------
----------