shitty wireframe
Page 1 of 2 12 Last
  1. #1

    shitty wireframe

    Hey guys,im trying to make a shitty wireframe through the command: r_drawothermodels 2.I don't exactly know why this code wont work,can someone help me out and tell me what i am doing wrong =\ im kind of a noob,sorry.
    Here's teh nub code:
    Code:
    void WallHack::shittywire()
    {
    		if(base.m_psCvar->vis_wireframe){
    		ConVar* drawothermodels =  base.m_pCvar->FindVar( "r_drawothermodels" );
    
    			drawothermodels->SetValue(2);
    		}
    }

  2. #2
    would be easyer this way
    Code:
    void WallHack::shittywire()
    {
        static int wirepatched = -1;
        if ((base.m_psCvar->vis_wireframe == 1) && (base.m_psCvar->vis_wireframe != wirepatched))
        {
                wirepatched = 1;
                HalFLife2.m_pEngine->ClientCmd ("r_drawothermodels 2");
        }
        else if ((base.m_psCvar->vis_wireframe == 0) && (base.m_psCvar->vis_wireframe != wirepatched))
        {
                wirepatched = 0;
                //nothing here
        }
    }
    Last edited by boom12345; 28th June 2008 at 17:07.

  3. #3
    or we could also:

    Code:
    void cRemovals::Wireframe()
    {
    	        //Textures and models to find
        IMaterial* C1 = HalFLife2.m_pMaterialSystem->FindMaterial("models\player\ct_gign\ct_gign", "Model textures");
        IMaterial* C2 = HalFLife2.m_pMaterialSystem->FindMaterial("models\player\ct_gsg9\ct_gsg9", "Model textures");
        IMaterial* C3 = HalFLife2.m_pMaterialSystem->FindMaterial("models\player\ct_sas\ct_sas", "Model textures");
        IMaterial* C4 = HalFLife2.m_pMaterialSystem->FindMaterial("models\player\ct_urban\ct_urban", "Model textures");
        IMaterial* T1 = HalFLife2.m_pMaterialSystem->FindMaterial("models\player\t_arctic\t_arctic", "Model textures");
        IMaterial* T2 = HalFLife2.m_pMaterialSystem->FindMaterial("models\player\t_guerilla\t_guerilla", "Model textures");
        IMaterial* T3 = HalFLife2.m_pMaterialSystem->FindMaterial("models\player\t_leet\t_leet", "Model textures");
        IMaterial* T4 = HalFLife2.m_pMaterialSystem->FindMaterial("models\player\t_phoenix\t_phoenix", "Model textures");
        
           // wireframe niggers
    	if(HalFLife2.m_psCvar->vis_wireframe)
    	{
    	    C1->SetMaterialVarFlag( MATERIAL_VAR_WIREFRAME, true );
    		C2->SetMaterialVarFlag( MATERIAL_VAR_WIREFRAME, true );
    		C3->SetMaterialVarFlag( MATERIAL_VAR_WIREFRAME, true );
    		C4->SetMaterialVarFlag( MATERIAL_VAR_WIREFRAME, true );
    		T1->SetMaterialVarFlag( MATERIAL_VAR_WIREFRAME, true );
    		T2->SetMaterialVarFlag( MATERIAL_VAR_WIREFRAME, true );
    		T3->SetMaterialVarFlag( MATERIAL_VAR_WIREFRAME, true );
    		T4->SetMaterialVarFlag( MATERIAL_VAR_WIREFRAME, true );
    	}
    	else
    	{
    	        C1->SetMaterialVarFlag( MATERIAL_VAR_WIREFRAME, false );
    		C2->SetMaterialVarFlag( MATERIAL_VAR_WIREFRAME, false );
    		C3->SetMaterialVarFlag( MATERIAL_VAR_WIREFRAME, false );
    		C4->SetMaterialVarFlag( MATERIAL_VAR_WIREFRAME, false );
    		T1->SetMaterialVarFlag( MATERIAL_VAR_WIREFRAME, false );
    		T2->SetMaterialVarFlag( MATERIAL_VAR_WIREFRAME, false );
    		T3->SetMaterialVarFlag( MATERIAL_VAR_WIREFRAME, false );
    		T4->SetMaterialVarFlag( MATERIAL_VAR_WIREFRAME, false );
    }
    }

  4. #4
    true Hardcore but ur code eats a few fps like 3 or 5 could be dangerous for people who got shitty pc :) my code is smaller and it dont eat fps (otherwise we could build static int .. in ur code than it would be good either ) :)

  5. #5
    For this:

    PHP Code:
    void WallHack::shittywire()
    {
            if(
    base.m_psCvar->vis_wireframe){
            
    ConVardrawothermodels =  base.m_pCvar->FindVar"r_drawothermodels" );

                
    drawothermodels->SetValue(2);
            }

    I think u have to bypass sv_cheats to use the code.

  6. #6
    Quote Originally Posted by lolwurst View Post
    For this:

    PHP Code:
    void WallHack::shittywire()
    {
            if(
    base.m_psCvar->vis_wireframe){
            
    ConVardrawothermodels =  base.m_pCvar->FindVar"r_drawothermodels" );

                
    drawothermodels->SetValue(2);
            }

    I think u have to bypass sv_cheats to use the code.
    yup.

  7. #7
    i did bypass sv_cheats but still don't work ill just use one of the codes you guys gave me.Thank you very much :)

  8. #8

  9. #9
    Cleanest way:

    Code:
    void MaterialHacks(){
    	IMaterial* Material = NULL;
    	char * name;	char * group;
    	for(int i=m_pMaterialSystem->FirstMaterial(); i < m_pMaterialSystem->GetNumMaterials(); i++){
    		Material = m_pMaterialSystem->GetMaterial(i);
    		name = (char*) Material->GetName();
    		if(strstr( name, "player" ))
    			Material->SetMaterialVarFlag( MATERIAL_VAR_WIREFRAME, true );		
    	    }
    	}

    Best method for asus, removals, xqz, etc as well just call your cvar in place of true
    :p

  10. #10
    mmmmm thank you

Page 1 of 2 12 Last

Tags for this Thread

Posting Permissions

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

Log in

Log in