Whats Wrong with this

Posts 1–15 of 18 · Page 1 of 2
Whats Wrong with this
Code:
HRESULT WINAPI gellDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE PrimType,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)
{
		 LPDIRECT3DVERTEXBUFFER9 StreamData; 
		 UINT Offset = 0; 
		 UINT m_Stride = 0; 

		if(pDevice->GetStreamSource(0,&StreamData,&Offset,&m_Stride) == D3D_OK) 
		StreamData->Release(); 
	
		if(Menu.mOpt[30].nopt == 2.00f)
        {
             if (m_Stride == 44 || m_Stride == 36 || m_Stride == 32)
             {
                    pDevice->SetTexture(0,texOrange);
                    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);

                    pDIP(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);

                    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
                    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
                    pDevice->SetTexture(0,texRed);
                }
        }
    
    return pDIP(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
}
Im not gonna put the whole source so yeah people like Void, blood, longevity please help me out for some reaosn the chams doesnt show up

So yeah I dont wanna share the hook
Hmm. That all looks ok.
Its how your creating your texture.

Put this in your Endscene/Present and it SHOULD work.

[php]
if(Menu.mOpt[30].nopt == 2.00f)
{
GenerateTexture(pDevice, &texOrange, 0x00000000);
GenerateTexture(pDevice, &texRed, 0x00000000);
}
[/php]

Just change the colours.
If that doesnt work, Then idk LOL
instead of creating the color every time Menu.mOpt[30].nopt = 2 just create colors once
put this in your endscene or present


Code:
if(Colors){
   GenerateTexture(pDevice, &texOrange , D3DCOLOR_ARGB(255,255,165,0));
   GenerateTexture(pDevice, &texRed , D3DCOLOR_ARGB(255,255,0,0));
   Colors = false;
}
Would you put that before you return it or after?
That still wont fix the main error TheBigBoy
Quote Originally Posted by pr0h4x0r View Post
That still wont fix the main error TheBigBoy
Are you even hooking DrawIndexedPrimitive?..
Yes i am. If any Pro guy want to help me out please pm and ill let you tv!
Learn to code, if you did that, learn how to hook
I have the right hook god dam it
Hook mean not to get it detected which it is not
I think you need textures.better ones.
i will help u dude but i wont provide source code i will tell u what ur doing wrong how u need to fix and what u need to approve on. If you take my request just pm ur tv info and i will help u about any time u really need help and i can help u out with.

anyways since im going to bed 1:55 am
you can contact me on msn geek4ever420@hotmail.com
If my status is away im usually sleeping or doing something else. i sleep about 10-12hours a day some times a lil more but i will get on.
Quote Originally Posted by TheBigBoy View Post
i will help u dude but i wont provide source code i will tell u what ur doing wrong how u need to fix and what u need to approve on. If you take my request just pm ur tv info and i will help u about any time u really need help and i can help u out with.

anyways since im going to bed 1:55 am
you can contact me on msn geek4ever420@hotmail.com
If my status is away im usually sleeping or doing something else. i sleep about 10-12hours a day some times a lil more but i will get on.
I added you sir
Real men stay up all night and sleep all day.

Anyways if that doesn't work look at Gordon`'s VMT hook / bypass. It works WONDERFULLY but that's if you don't c&p it and hook correctly.

Try this:


Code:
	if( iChams == 2  )
	{
		if( uiStride == 32 || uiStride == 36 || uiStride == 44 )
		{
			 DWORD dwOldZEnable = D3DZB_TRUE;
             myDevice9->GetRenderState(D3DRS_ZENABLE, &dwOldZEnable);
			 myDevice9->SetRenderState(D3DRS_LIGHTING, false);
             myDevice9->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
			 pDrawIndexedPrimitive(myDevice9, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
             myDevice9->SetRenderState(D3DRS_ZENABLE, dwOldZEnable);
             myDevice9->SetRenderState(D3DRS_ZENABLE,true);
		}
	}
If that doesn't work then you aren't hooking DrawIndexedPrimitive correctly or I don't know.
trying right now
Edit: it lagged more i thought it was gonna work but didnt
Posts 1–15 of 18 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us