Jump to content
Welcome, Guest
Existing user? Sign In

Sign In



Sign Up
The MatriX
  • Welcome To Ghbsys
  • CS GO Streaming Version is released. Have fun streaming while cheating!
  • Have a Payment Issue? Send us a Support ticket.
  • Make a thread if you need support or join our discord for live support.
  • Have Suggestions? Make a thread and you'll earn Ghbsys Points for implemented suggestions.
  • Join our discord to stay well connected! Don't forget to integrate your discord to the site
  • Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum

    Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of [GHB] - GAmEhAcKbAsTaRdS Forum by signing in or creating an account.
    • Start new topics and reply to others
    • Subscribe to topics and forums to get email updates
    • Get your own profile page and make new friends
    • Send personal messages to other members.

    D3D9 chams


    Cr4zyw4rz
     Share

    Recommended Posts

    Hi i have an error, chams not worked.

     

    if (mi.chams1==1)
    {
    	if(m_Stride==44)
    	{
    	pDevice->SetTexture(1,0);
    	pDevice->SetRenderState(D3DRS_ZENABLE,TRUE);
    	pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255, 255, 000, 000));
    	}
    }

     

     

    Who help me please.

     

    Thx

     

    Regards

    Link to comment
    Share on other sites

    if (mi.chams1==1)

    {

    if(m_Stride==44)

    {

    pDevice->SetTexture(1,0);

    pDevice->SetRenderState(D3DRS_ZENABLE,TRUE);

    pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255, 255, 000, 000);

    }

    }

    Link to comment
    Share on other sites

    naps change the strides to 32 and 36 O.o

    Link to comment
    Share on other sites

    Ok, i don't have erreur, but, my chams not work

     

    Hii, if you have 10minutes for look my problem.

     

    Ok, i don't have erreur, but, my chams not work

     

     

    int Color = false;
    UINT m_Stride;
    UINT OffsetInBytes;
    LPDIRECT3DVERTEXBUFFER9 StreamData;
    LPDIRECT3DTEXTURE9 cRed,cGreen,cBlue,cYellow,cPurple,cPink,cBlack,cCyan,cWhite;

     

    int chamsmenu=0;
    int chams1=0;
    int chams2=0;

     

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

     

    if(Color)
    {
    	GenerateTexture(pDevice, &cRed,		D3DCOLOR_ARGB (255 , 255,   0,	0 ));
    	GenerateTexture(pDevice, &cGreen,	D3DCOLOR_ARGB (255 ,   0, 255,	0 ));
    	GenerateTexture(pDevice, &cBlue,	D3DCOLOR_ARGB (255 ,   0,   0,  255 ));
    	GenerateTexture(pDevice, &cYellow,	D3DCOLOR_ARGB (255 , 255, 255,	0 ));
    	GenerateTexture(pDevice, &cPurple,	D3DCOLOR_ARGB (255 , 102,   0,  153 ));
    	GenerateTexture(pDevice, &cPink,	D3DCOLOR_ARGB (255 , 255,  20,  147));
    	GenerateTexture(pDevice, &cBlack,	D3DCOLOR_ARGB (255 , 0  ,   0 ,   0 ));
    	GenerateTexture(pDevice, &cCyan , 	D3DCOLOR_ARGB (255 , 0  , 139 , 200 ));
    	GenerateTexture(pDevice, &cWhite,	D3DCOLOR_ARGB (255 , 255, 255 , 255 ));
    	Color = false;
    }

     

    HRESULT WINAPI myDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount)
    {
    if(pDevice->GetStreamSource(0,&StreamData,&OffsetInBytes,&m_Stride) == D3D_OK) 
    {
    	StreamData->Release();
    }
    if(mi.chamsmenu==1)
    {
    	if(mi.chams1 || !mi.chams1)
    	{
    		if(m_Stride == 36)
    		{
    			if(mi.chams1 ) pDevice->SetRenderState(D3DRS_ZENABLE, false);
    			if(mi.chams1 ==1){pDevice->SetTexture(0, cRed);}
    			if(mi.chams1 ==2){pDevice->SetTexture(0, cGreen);}
    			if(mi.chams1 ==3){pDevice->SetTexture(0, cBlue);}
    			if(mi.chams1 ==4){pDevice->SetTexture(0, cYellow);}
    			if(mi.chams1 ==5){pDevice->SetTexture(0, cPurple);}
    			if(mi.chams1 ==6){pDevice->SetTexture(0, cPink);}
    			if(mi.chams1 ==7){pDevice->SetTexture(0, cBlack);}
    			if(mi.chams1 ==8){pDevice->SetTexture(0, cCyan);}
    			if(mi.chams1 ==9){pDevice->SetTexture(0, cWhite);}
    			pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    
    		}
    	}
    }
    if(mi.chamsmenu==1)
    {
    	if(mi.chams2 || !mi.chams2)
    	{
    		if(m_Stride == 32)
    		{
    			if(mi.chams2) pDevice->SetRenderState(D3DRS_ZENABLE, false);
    			if(mi.chams2==1){pDevice->SetTexture(0, cRed);}
    			if(mi.chams2==2){pDevice->SetTexture(0, cGreen);}
    			if(mi.chams2==3){pDevice->SetTexture(0, cBlue);}
    			if(mi.chams2==4){pDevice->SetTexture(0, cYellow);}
    			if(mi.chams2==5){pDevice->SetTexture(0, cPurple);}
    			if(mi.chams2==6){pDevice->SetTexture(0, cPink);}
    			if(mi.chams2==7){pDevice->SetTexture(0, cBlack);}
    			if(mi.chams2==8){pDevice->SetTexture(0, cCyan);}
    			if(mi.chams2==9){pDevice->SetTexture(0, cWhite);}
    		}
    	}
    }
    return pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
    }

     

    why chams not work ?

    Thx

     

    who help ?

    Edited by Cr4zyw4rz
    Link to comment
    Share on other sites

    • 2 weeks later...
    Guest
    This topic is now closed to further replies.
     Share

    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...