HRESULT WINAPI nDrawIndexedPrimitive( IDirect3DDevice9* gDevice, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount) { /* arg_0 = dword ptr 8 //device arg_4 = dword ptr 0Ch arg_8 = dword ptr 10h arg_C = dword ptr 14h arg_10 = dword ptr 18h arg_14 = dword ptr 1Ch arg_18 = dword ptr 20h */ DWORD dwgDevice; DWORD dwType; DWORD dwBaseV; DWORD dwMinI; DWORD dwNumVert; DWORD dwStartI; DWORD dwPrimitiveC; char Test[256]; _asm { mov eax, [ESP+0x8]; mov dwgDevice, eax; mov eax, [EBP+0xC]; mov dwType, eax; mov eax, [EBP+0x10]; mov dwBaseV, eax; mov eax, [EBP+0x14]; mov dwMinI, eax; mov eax, [EBP+0x18]; mov dwNumVert, eax; mov eax, [EBP+0x1C]; mov dwStartI, eax; mov eax, [EBP+0x20]; mov dwPrimitiveC, eax; } sprintf( Test, "0x%x", dwgDevice ); if(GetAsyncKeyState( VK_NUMPAD1) &1) MessageBox( NULL, Test, "lol", MB_OK ); if(Scopes && bNoScope && ( Player->Zoomed != 0 )) return 0; if(Smoke && bNoSmoke) return 0; if( ( ( bPlayerChams && GoodPlayers ) || ( bXQZWallHack && GoodPlayers ) ) && NumVertices >= 50 && PrimitiveCount >= 50 ) { if(bXQZWallHack) { pDevice->SetRenderState(D3DRS_ZENABLE, false); if (bPlayerChams) pDevice->SetTexture(0, texLBlue); pDrawIndexedPrimitive (pDevice, Type, BaseVertexIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount); pDevice->SetRenderState(D3DRS_ZENABLE, true); } if (bPlayerChams) { pDevice->SetTexture(0, texBlue); return pDrawIndexedPrimitive (pDevice, Type, BaseVertexIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount); } } if( ((bPlayerChams && BadPlayers) || ( bXQZWallHack && BadPlayers) ) && NumVertices >= 50 && PrimitiveCount >= 50) { if(bXQZWallHack) { pDevice->SetRenderState(D3DRS_ZENABLE, false); if (bPlayerChams) pDevice->SetTexture(0, texOrange); pDrawIndexedPrimitive (pDevice, Type, BaseVertexIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount); pDevice->SetRenderState(D3DRS_ZENABLE, true); } if (bPlayerChams) { pDevice->SetTexture(0, texYellow); return pDrawIndexedPrimitive (pDevice, Type, BaseVertexIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount); } } if (bAsusWallHack) { pDevice->SetRenderState( D3DRS_SRCBLEND, 0x3 ); pDevice->SetRenderState( D3DRS_DESTBLEND, 0x2 ); pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE ); } HRESULT hRet = pDrawIndexedPrimitive( gDevice, Type, BaseVertexIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount); return hRet; }