SHARE
TWEET

Untitled

a guest Jul 17th, 2017 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.     bool Hooked_RecvProxy_Viewmodel( CRecvProxyData *pData, void *pStruct, void *pOut );
  3.     {
  4.         // Get the knife view model id's
  5.         int default_t = Interfaces::ModelInfo->GetModelIndex( "models/weapons/v_knife_default_t.mdl" );
  6.         int default_ct = Interfaces::ModelInfo->GetModelIndex( "models/weapons/v_knife_default_ct.mdl" );
  7.         int iBayonet = Interfaces::ModelInfo->GetModelIndex( "models/weapons/v_knife_bayonet.mdl" );
  8.         int iButterfly = Interfaces::ModelInfo->GetModelIndex( "models/weapons/v_knife_butterfly.mdl" );
  9.         int iFlip = Interfaces::ModelInfo->GetModelIndex( "models/weapons/v_knife_flip.mdl" );
  10.         int iGut = Interfaces::ModelInfo->GetModelIndex( "models/weapons/v_knife_gut.mdl" );
  11.         int iKarambit = Interfaces::ModelInfo->GetModelIndex( "models/weapons/v_knife_karam.mdl" );
  12.         int iM9Bayonet = Interfaces::ModelInfo->GetModelIndex( "models/weapons/v_knife_m9_bay.mdl" );
  13.         int iHuntsman = Interfaces::ModelInfo->GetModelIndex( "models/weapons/v_knife_tactical.mdl" );
  14.         int iFalchion = Interfaces::ModelInfo->GetModelIndex( "models/weapons/v_knife_falchion_advanced.mdl" );
  15.         int iDagger = Interfaces::ModelInfo->GetModelIndex( "models/weapons/v_knife_push.mdl" );
  16.         int iBowie = Interfaces::ModelInfo->GetModelIndex( "models/weapons/v_knife_survival_bowie.mdl" );
  17.  
  18.         int iGunGame = Interfaces::ModelInfo->GetModelIndex( "models/weapons/v_knife_gg.mdl" );
  19.  
  20.         // Get local player (just to stop replacing spectators knifes)
  21.         IClientEntity* pLocal = Interfaces::EntList->GetClientEntity( Interfaces::Engine->GetLocalPlayer() );
  22.         CRecvProxyData* pData;
  23.         if ( Menu::Window.SkinTab.SkinEnable.GetState() && pLocal )
  24.         {
  25.  
  26.             // If we are alive and holding a default knife(if we already have a knife don't worry about changing)
  27.             if ( pLocal->IsAlive() && (
  28.                 pData->m_Value.m_Int == default_t ||
  29.                 pData->m_Value.m_Int == default_ct ||
  30.                 pData->m_Value.m_Int == iBayonet ||
  31.                 pData->m_Value.m_Int == iButterfly ||
  32.                 pData->m_Value.m_Int == iFlip ||
  33.                 pData->m_Value.m_Int == iGunGame ||
  34.                 pData->m_Value.m_Int == iGut ||
  35.                 pData->m_Value.m_Int == iKarambit ||
  36.                 pData->m_Value.m_Int == iM9Bayonet ||
  37.                 pData->m_Value.m_Int == iHuntsman ||
  38.                 pData->m_Value.m_Int == iFalchion ||
  39.                 pData->m_Value.m_Int == iDagger ||
  40.                 pData->m_Value.m_Int == iBowie ) )
  41.             {
  42.                 // Set whatever knife we want
  43.                 if ( Interfaces::ModelInfo->GetModelIndex( "models/weapons/v_knife_butterfly.mdl" ));
  44.                 pData->m_Value.m_Int = iButterfly;
  45.                 //if ( Menu::Window.SkinTab.KnifeModel.GetIndex() == 0 )
  46.                 //  pData->m_Value.m_Int = iBayonet;
  47.                 //else if ( Menu::Window.SkinTab.KnifeModel.GetIndex() == 1 )
  48.                 //  pData->m_Value.m_Int = iBowie;
  49.                 //else if ( Menu::Window.SkinTab.KnifeModel.GetIndex() == 2 )
  50.                 //  pData->m_Value.m_Int = iButterfly;
  51.                 //else if ( Menu::Window.SkinTab.KnifeModel.GetIndex() == 3 )
  52.                 //  pData->m_Value.m_Int = iFalchion;
  53.                 //else if ( Menu::Window.SkinTab.KnifeModel.GetIndex() == 4 )
  54.                 //  pData->m_Value.m_Int = iFlip;
  55.                 //else if ( Menu::Window.SkinTab.KnifeModel.GetIndex() == 5 )
  56.                 //  pData->m_Value.m_Int = iGut;
  57.                 //else if ( Menu::Window.SkinTab.KnifeModel.GetIndex() == 6 )
  58.                 //  pData->m_Value.m_Int = iHuntsman;
  59.                 //else if ( Menu::Window.SkinTab.KnifeModel.GetIndex() == 7 )
  60.                 //  pData->m_Value.m_Int = iKarambit;
  61.                 //else if ( Menu::Window.SkinTab.KnifeModel.GetIndex() == 8 )
  62.                 //  pData->m_Value.m_Int = iM9Bayonet;
  63.                 //else if ( Menu::Window.SkinTab.KnifeModel.GetIndex() == 9 )
  64.                 //  pData->m_Value.m_Int = iDagger;
  65.             }
  66.         }
  67.  
  68.         // Carry on the to original proxy
  69.     }
RAW Paste Data
Top