Results 1 to 10 of 10

Thread: [cod4]Perfect Modelrec with Chams

  1. #1
    Join Date
    Jun 2000
    Posts
    603

    Default [cod4]Perfect Modelrec with Chams

    Code:
    struct struct_a1{
     	BYTE f0[140];
    };
    
    struct struct_a2{
    	BYTE f0[148];
    	DWORD dword94;
    	BYTE f1[32];
    	char** SkinName;
    	BYTE SkinNum;//7 = Team, 9 = Enemy - but flickers
    	BYTE f2[12];
    	int SelfViewSkin;//0 = Only Players 2 = only you
    	BYTE f3[20];
    };
    
    
    
    struct ModelNums_t{
     BYTE f0[2];
     WORD num1;
     WORD num2;
     BYTE SolidModelNum;//4 = player 5 = weapon
     BYTE SolidModelNum2;
     BYTE SolidModelNum3;
     BYTE SolidModelNum4;//0 = all 6 = self weapon 12 = self arm
     BYTE SolidModelNum5;
    };
    
    
    struct struct_a3{
     DWORD dword0;
     ModelNums_t* ModelNums;
    };
    
    
    void  (*orig_R_DrawXModelSkinnedCached)(   struct_a1* a1, struct_a2* a2, struct_a3* a3 ) = (void (  *)(  struct_a1* a1, struct_a2* a2, struct_a3* a3  ))0x646870;
    void R_DrawXModelSkinnedCached( struct_a1* a1, struct_a2* a2, struct_a3* a3  )
    {
    	g_pDraw.Directx_Registers( );
    
    	if(!VisualsDisabled)
    	{
    		if(a2->SelfViewSkin == 0)
    		{
    			if( strcmp(*a2->SkinName, "mc/mtl_marine_" ) == 1 && strcmp(*a2->SkinName, "mc/mtl_sas" ) == 1  )
    			{		
    				
    				if (hookValue[VAR_NOFOG])
    					cod4_device->device->SetRenderState( D3DRS_FOGENABLE ,FALSE );
    				
    				
    				
    				if (hookValue[VAR_WALLHACK])
    				{
    					cod4_device->device->SetRenderState( D3DRS_ZFUNC, D3DCMP_ALWAYS );
    					
    				}
    				else
    				{
    					cod4_device->device->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    					
    				}
    				
    				
    				if (hookValue[VAR_CHAMS])
    				{
    					
    					if( hookValue[VAR_CHAMS_TYPE] == 0 )
    					{
    						if (hookValue[VAR_COLORS]== 0)
    							cod4_device->device->SetPixelShader(re_Red); 
    						if (hookValue[VAR_COLORS]== 1)
    							cod4_device->device->SetPixelShader(re_Green); 
    						if (hookValue[VAR_COLORS]== 2)
    							cod4_device->device->SetPixelShader(re_Blue); 
    						if (hookValue[VAR_COLORS]== 3)
    							cod4_device->device->SetPixelShader(re_White); 
    						if (hookValue[VAR_COLORS]== 4)
    							cod4_device->device->SetPixelShader(re_Black); 
    						if (hookValue[VAR_COLORS]== 5)
    							cod4_device->device->SetPixelShader(re_Yellow); 
    						if (hookValue[VAR_COLORS]== 6)
    							cod4_device->device->SetPixelShader(re_Organge); 
    						if (hookValue[VAR_COLORS]== 7)
    							cod4_device->device->SetPixelShader(re_Magenta); 
    						if (hookValue[VAR_COLORS]== 8)
    							cod4_device->device->SetPixelShader(re_Cyan); 
    					}
    					
    					if( hookValue[VAR_CHAMS_TYPE] == 1 )
    					{
    						if (hookValue[VAR_COLORS]== 0)
    							cod4_device->device->SetTexture(0,te_Red); 
    						if (hookValue[VAR_COLORS]== 1)
    							cod4_device->device->SetTexture(0,te_Green); 
    						if (hookValue[VAR_COLORS]== 2)
    							cod4_device->device->SetTexture(0,te_Blue); 
    						if (hookValue[VAR_COLORS]== 3)
    							cod4_device->device->SetTexture(0,te_White); 
    						if (hookValue[VAR_COLORS]== 4)
    							cod4_device->device->SetTexture(0,te_Black); 
    						if (hookValue[VAR_COLORS]== 5)
    							cod4_device->device->SetTexture(0,te_Yellow); 
    						if (hookValue[VAR_COLORS]== 6)
    							cod4_device->device->SetTexture(0,te_Organge); 
    						if (hookValue[VAR_COLORS]== 7)
    							cod4_device->device->SetTexture(0,te_Magenta); 
    						if (hookValue[VAR_COLORS]== 8)
    							cod4_device->device->SetTexture(0,te_Cyan); 
    					}
    					
    					
    				}
    				
    				
    				if (hookValue[VAR_WIREFRAME] == 1)
    				{
    					cod4_device->device->SetRenderState(D3DRS_FILLMODE,   D3DFILL_WIREFRAME );
    				}
    				if (hookValue[VAR_WIREFRAME] == 2)
    				{
    					cod4_device->device->SetRenderState(D3DRS_FILLMODE,   D3DFILL_POINT );
    				}
    				
    				
    				if (hookValue[VAR_FULLBRIGHT2])
    				{
    					cod4_device->device->SetRenderState(D3DRS_LIGHTING, false);
    				}
    				
    				
    			}
    			else if( strcmp(*a2->SkinName, "mc/mtl_" ) == 1 )
    			{
    				
    				if (hookValue[VAR_NOFOG])
    					cod4_device->device->SetRenderState( D3DRS_FOGENABLE ,FALSE );
    				
    				
    				
    				if (hookValue[VAR_WALLHACK])
    				{
    					cod4_device->device->SetRenderState( D3DRS_ZFUNC, D3DCMP_ALWAYS );
    					
    				}
    				else
    				{
    					cod4_device->device->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    					
    				}
    				
    				
    				if (hookValue[VAR_CHAMS])
    				{
    					if( hookValue[VAR_CHAMS_TYPE] == 0 )
    					{
    						if (hookValue[VAR_COLORSTEAM]== 0)
    							cod4_device->device->SetPixelShader(re_Red); 
    						if (hookValue[VAR_COLORSTEAM]== 1)
    							cod4_device->device->SetPixelShader(re_Green); 
    						if (hookValue[VAR_COLORSTEAM]== 2)
    							cod4_device->device->SetPixelShader(re_Blue); 
    						if (hookValue[VAR_COLORSTEAM]== 3)
    							cod4_device->device->SetPixelShader(re_White); 
    						if (hookValue[VAR_COLORSTEAM]== 4)
    							cod4_device->device->SetPixelShader(re_Black); 
    						if (hookValue[VAR_COLORSTEAM]== 5)
    							cod4_device->device->SetPixelShader(re_Yellow); 
    						if (hookValue[VAR_COLORSTEAM]== 6)
    							cod4_device->device->SetPixelShader(re_Organge); 
    						if (hookValue[VAR_COLORSTEAM]== 7)
    							cod4_device->device->SetPixelShader(re_Magenta); 
    						if (hookValue[VAR_COLORSTEAM]== 8)
    							cod4_device->device->SetPixelShader(re_Cyan); 
    					}
    					if( hookValue[VAR_CHAMS_TYPE] == 1 )
    					{
    						if (hookValue[VAR_COLORSTEAM]== 0)
    							cod4_device->device->SetTexture(0,te_Red); 
    						if (hookValue[VAR_COLORSTEAM]== 1)
    							cod4_device->device->SetTexture(0,te_Green); 
    						if (hookValue[VAR_COLORSTEAM]== 2)
    							cod4_device->device->SetTexture(0,te_Blue); 
    						if (hookValue[VAR_COLORSTEAM]== 3)
    							cod4_device->device->SetTexture(0,te_White); 
    						if (hookValue[VAR_COLORSTEAM]== 4)
    							cod4_device->device->SetTexture(0,te_Black); 
    						if (hookValue[VAR_COLORSTEAM]== 5)
    							cod4_device->device->SetTexture(0,te_Yellow); 
    						if (hookValue[VAR_COLORSTEAM]== 6)
    							cod4_device->device->SetTexture(0,te_Organge); 
    						if (hookValue[VAR_COLORSTEAM]== 7)
    							cod4_device->device->SetTexture(0,te_Magenta); 
    						if (hookValue[VAR_COLORSTEAM]== 8)
    							cod4_device->device->SetTexture(0,te_Cyan); 
    					}
    				}
    				
    				
    				if (hookValue[VAR_WIREFRAME] == 1)
    				{
    					cod4_device->device->SetRenderState(D3DRS_FILLMODE,   D3DFILL_WIREFRAME );
    				}
    				if (hookValue[VAR_WIREFRAME] == 2)
    				{
    					cod4_device->device->SetRenderState(D3DRS_FILLMODE,   D3DFILL_POINT );
    				}
    				
    				
    				if (hookValue[VAR_FULLBRIGHT2])
    				{
    					cod4_device->device->SetRenderState(D3DRS_LIGHTING, false);
    				}
    			}
    		}
       }
       
       
       orig_R_DrawXModelSkinnedCached( a1,  a2, a3 );
          
       if(!VisualsDisabled)
       {
    	   if(a2->SelfViewSkin == 0)
    	   {
    		   if( strcmp(*a2->SkinName, "mc/mtl_marine_" ) == 1 && strcmp(*a2->SkinName, "mc/mtl_sas" ) == 1  )
    		   {
    			   if (hookValue[VAR_CHAMS])
    			   {
    				   if( hookValue[VAR_CHAMS_TYPE] == 0 )
    				   {
    					   if (hookValue[VAR_COLORS2]== 0)
    						   cod4_device->device->SetPixelShader(re_Red); 
    					   if (hookValue[VAR_COLORS2]== 1)
    						   cod4_device->device->SetPixelShader(re_Green); 
    					   if (hookValue[VAR_COLORS2]== 2)
    						   cod4_device->device->SetPixelShader(re_Blue); 
    					   if (hookValue[VAR_COLORS2]== 3)
    						   cod4_device->device->SetPixelShader(re_White); 
    					   if (hookValue[VAR_COLORS2]== 4)
    						   cod4_device->device->SetPixelShader(re_Black); 
    					   if (hookValue[VAR_COLORS2]== 5)
    						   cod4_device->device->SetPixelShader(re_Yellow); 
    					   if (hookValue[VAR_COLORS2]== 6)
    						   cod4_device->device->SetPixelShader(re_Organge); 
    					   if (hookValue[VAR_COLORS2]== 7)
    						   cod4_device->device->SetPixelShader(re_Magenta); 
    					   if (hookValue[VAR_COLORS2]== 8)
    						   cod4_device->device->SetPixelShader(re_Cyan); 
    				   }
    				   if( hookValue[VAR_CHAMS_TYPE] == 1 )
    				   {
    					   if (hookValue[VAR_COLORS2]== 0)
    						   cod4_device->device->SetTexture(0,te_Red); 
    					   if (hookValue[VAR_COLORS2]== 1)
    						   cod4_device->device->SetTexture(0,te_Green); 
    					   if (hookValue[VAR_COLORS2]== 2)
    						   cod4_device->device->SetTexture(0,te_Blue); 
    					   if (hookValue[VAR_COLORS2]== 3)
    						   cod4_device->device->SetTexture(0,te_White); 
    					   if (hookValue[VAR_COLORS2]== 4)
    						   cod4_device->device->SetTexture(0,te_Black); 
    					   if (hookValue[VAR_COLORS2]== 5)
    						   cod4_device->device->SetTexture(0,te_Yellow); 
    					   if (hookValue[VAR_COLORS2]== 6)
    						   cod4_device->device->SetTexture(0,te_Organge); 
    					   if (hookValue[VAR_COLORS2]== 7)
    						   cod4_device->device->SetTexture(0,te_Magenta); 
    					   if (hookValue[VAR_COLORS2]== 8)
    						   cod4_device->device->SetTexture(0,te_Cyan); 
    				   }
    			   }
    			   
    			   if (hookValue[VAR_NOFOG])
    				   cod4_device->device->SetRenderState( D3DRS_FOGENABLE ,FALSE );
    			   
    			   if (hookValue[VAR_WALLHACK])
    			   {
    				   cod4_device->device->SetRenderState( D3DRS_ZFUNC, D3DCMP_LESS ); 
    				   
    			   }
    			   else
    			   {
    				   cod4_device->device->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE );
    			   }
    			   
    			   if (hookValue[VAR_WIREFRAME] )
    				   cod4_device->device->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID);
    			   
    		   }
    		   else if( strcmp(*a2->SkinName, "mc/mtl_" ) == 1 )
    		   {
    			   
    			   if (hookValue[VAR_CHAMS])
    			   {
    				   if( hookValue[VAR_CHAMS_TYPE] == 0 )
    				   {
    					   if (hookValue[VAR_COLORSTEAM2]== 0)
    						   cod4_device->device->SetPixelShader(re_Red); 
    					   if (hookValue[VAR_COLORSTEAM2]== 1)
    						   cod4_device->device->SetPixelShader(re_Green); 
    					   if (hookValue[VAR_COLORSTEAM2]== 2)
    						   cod4_device->device->SetPixelShader(re_Blue); 
    					   if (hookValue[VAR_COLORSTEAM2]== 3)
    						   cod4_device->device->SetPixelShader(re_White); 
    					   if (hookValue[VAR_COLORSTEAM2]== 4)
    						   cod4_device->device->SetPixelShader(re_Black); 
    					   if (hookValue[VAR_COLORSTEAM2]== 5)
    						   cod4_device->device->SetPixelShader(re_Yellow); 
    					   if (hookValue[VAR_COLORSTEAM2]== 6)
    						   cod4_device->device->SetPixelShader(re_Organge); 
    					   if (hookValue[VAR_COLORSTEAM2]== 7)
    						   cod4_device->device->SetPixelShader(re_Magenta); 
    					   if (hookValue[VAR_COLORSTEAM2]== 8)
    						   cod4_device->device->SetPixelShader(re_Cyan);
    				   }
    				   if( hookValue[VAR_CHAMS_TYPE] == 1 )
    				   {
    					   if (hookValue[VAR_COLORSTEAM2]== 0)
    						   cod4_device->device->SetTexture(0,te_Red); 
    					   if (hookValue[VAR_COLORSTEAM2]== 1)
    						   cod4_device->device->SetTexture(0,te_Green); 
    					   if (hookValue[VAR_COLORSTEAM2]== 2)
    						   cod4_device->device->SetTexture(0,te_Blue); 
    					   if (hookValue[VAR_COLORSTEAM2]== 3)
    						   cod4_device->device->SetTexture(0,te_White); 
    					   if (hookValue[VAR_COLORSTEAM2]== 4)
    						   cod4_device->device->SetTexture(0,te_Black); 
    					   if (hookValue[VAR_COLORSTEAM2]== 5)
    						   cod4_device->device->SetTexture(0,te_Yellow); 
    					   if (hookValue[VAR_COLORSTEAM2]== 6)
    						   cod4_device->device->SetTexture(0,te_Organge); 
    					   if (hookValue[VAR_COLORSTEAM2]== 7)
    						   cod4_device->device->SetTexture(0,te_Magenta); 
    					   if (hookValue[VAR_COLORSTEAM2]== 8)
    						   cod4_device->device->SetTexture(0,te_Cyan); 
    				   }
    			   }
    			   
    			   if (hookValue[VAR_NOFOG])
    				   cod4_device->device->SetRenderState( D3DRS_FOGENABLE ,FALSE );
    			   
    			   if (hookValue[VAR_WALLHACK])
    			   {
    				   cod4_device->device->SetRenderState( D3DRS_ZFUNC, D3DCMP_LESS ); 
    				   
    			   }
    			   else
    			   {
    				   cod4_device->device->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE );
    			   }
    			   
    			   if (hookValue[VAR_WIREFRAME] )
    				   cod4_device->device->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID);
    		   }
    	   }
       }
       
    
       orig_R_DrawXModelSkinnedCached( a1,  a2, a3 );
       
    }

    credits: c r x, sinner
    Attached Images Attached Images
    Last edited by King-OrgY; 15th April 2011 at 08:44.

  2. #2
    Join Date
    Jan 2010
    Location
    America
    Posts
    244

    Default

    very very nice
    [SIGPIC][/SIGPIC]

  3. #3
    Join Date
    May 2009
    Posts
    3,079

    Default

    Looks great, i was also surprised with a video u posted elsewhere King, was it shader related chams or what ?
    it seems it was emiting light or something.
    ~ ~

  4. #4
    Join Date
    Apr 2011
    Location
    France
    Age
    21
    Posts
    6

    Default

    King-Orgy, you're just god

  5. #5
    Join Date
    Oct 2010
    Location
    /dev/null
    Posts
    81

    Default

    Quote Originally Posted by lolzoruslockus View Post
    Looks great, i was also surprised with a video u posted elsewhere King, was it shader related chams or what ?
    it seems it was emiting light or something.
    This?
    http://www.youtube.com/watch?v=7tCApcWkawQ
    netCoders.cc
    Quote Originally Posted by Darkfader
    [05:23] Evil - Darkfader : pf i today realized your name is porn site
    [05:23] Evil - Darkfader : rofl
    [05:23] kEEZ#: haha
    [05:23] Evil - Darkfader : have earlier tought its just something random
    [05:23] Evil - Darkfader : but saw today link to keezmovies.com and was bit suprised
    [05:23] Evil - Darkfader : lol

  6. #6
    Join Date
    Jun 2000
    Posts
    603

  7. #7
    Join Date
    Apr 2011
    Location
    France
    Age
    21
    Posts
    6

    Default

    Orgy, will you release those chams : http://www.youtube.com/watch?v=ozaWUStVDB8 ?

  8. #8
    Join Date
    Jun 2000
    Posts
    603

    Default

    i stooped to release hacks for cod4 the game is almost dead and is to old

  9. #9
    Join Date
    Apr 2011
    Location
    France
    Age
    21
    Posts
    6

    Default

    Quote Originally Posted by King-Orgy View Post
    i stooped to release hacks for cod4 the game is almost dead and is to old
    Oh ok :/

  10. #10

    Default

    Quote Originally Posted by King-Orgy View Post
    i stooped to release hacks for cod4 the game is almost dead and is to old
    Yeah, that happens when you kill a game! (:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •