Advertisement
Guest User

Kenjin/Awppwns Client.cpp

a guest
Sep 5th, 2012
1,455
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 35.36 KB | None | 0 0
  1. #include "main.h"
  2. int dead, me, killer;
  3. bool IsAlive(C_BaseEntity* pEnt)
  4. {
  5.     char lifestate = *(PCHAR)((DWORD)pEnt + m_offsets.dw_m_lifestats());
  6.     if(!(lifestate == LIFE_ALIVE))
  7.         return false;
  8.     return true;
  9. }
  10.     void CustomBorder2(int x,int y,int w, int h, DWORD dwBorderColor)
  11.     {
  12.             gNeeded.fillRGBA( x-1, y, 4, h-2,dwBorderColor );//left
  13.     }
  14.     void CustomBorder3(int x,int y,int w, int h, DWORD dwBorderColor)
  15.     {
  16.             gNeeded.fillRGBA( (x-3)+w, y, 4, h-2,dwBorderColor);//right
  17.     }
  18.     void CustomBorder4(int x,int y,int w, int h, DWORD dwBorderColor)
  19.     {
  20.             gNeeded.fillRGBA( x-1, y, 3, h-2 ,dwBorderColor);//left
  21.     }
  22.     void CustomBorder5(int x,int y,int w, int h, DWORD dwBorderColor)
  23.     {
  24.             gNeeded.fillRGBA( (x-2)+w, y, 3, h-2 ,dwBorderColor);//right
  25.     }
  26.     void CustomBorder(int x,int y,int w, int h, DWORD dwBorderColor){
  27.             gNeeded.fillRGBA( x-2, y-2, w+4, 2 ,dwBorderColor); //top
  28.             gNeeded.fillRGBA( x-2, y, 1, h-2 ,dwBorderColor );//left
  29.             gNeeded.fillRGBA( x+w+1, y, 1, h-2 ,dwBorderColor);     //right
  30.         gNeeded.fillRGBA( x-2, y+h-2, w+4, 2 ,dwBorderColor);}//down
  31.     void DrawBoundingBox(C_BaseEntity *pEnt,DWORD colour,int index){
  32.             Vector mon, nom;
  33.             DWORD dwGetColor = COLORCODE(255,255,255,255);
  34.             nom = pEnt->GetAbsOrigin();
  35.             int flags = *(int*)((DWORD)pEnt + m_offsets.dw_m_fFlags());
  36.             if(flags & FL_DUCKING)
  37.                     mon = nom + Vector( 0, 0, 50.f );
  38.             else
  39.                     mon = nom + Vector( 0, 0, 70.f );
  40.             Vector bot, top;
  41.             player_info_t pInfo;
  42.             IClientEntity* pBaseEntClient;
  43.             Vector vScreen;         //see my name
  44.             Vector vWorldPosition;  //see my name
  45.             Vector vPlayerHead;     //see my name
  46.  
  47.             pBaseEntClient = g_pEntList->GetClientEntity(index);
  48.             g_pEngine->GetPlayerInfo(pBaseEntClient->entindex(), &pInfo);
  49.             C_BaseEntity* pBaseEnt;
  50.             pBaseEnt = pBaseEntClient->GetBaseEntity();
  51.             if( gNeeded.TransformVector( nom, bot ) && gNeeded.TransformVector( mon, top ) ){
  52.                     float h = ( bot.y - top.y );
  53.                     float w = h / 5.f;
  54.                     int health = *(int*)((DWORD)pEnt + m_offsets.dw_m_iHeahlt());
  55.                     int armor = *(int*)((DWORD)pEnt + 0x141C );
  56.                     int punchx = *(int*)((DWORD)pEnt + m_offsets.dw_m_vecPunchAngle_x());
  57.  
  58.                             //Box ESP,Health,Armor Bar by xutax
  59.                             /*CustomBorder(top.x - w,top.y, w * 2, ( bot.y - top.y ), colour );
  60.                             CustomBorder2(top.x - w,top.y, w * 2, ( bot.y - top.y ), COLORCODE(0,0,0,128));
  61.                             CustomBorder3(top.x - w,top.y, w * 2, ( bot.y - top.y ), COLORCODE(0,0,0,128));
  62.                             CustomBorder4(top.x - w,top.y, w * 2, ( bot.y - top.y ) * health / 100, COLORCODE(255,255,255,128+64));
  63.                             CustomBorder5(top.x - w,top.y, w * 2, ( bot.y - top.y ) * armor / 100, COLORCODE(255,255,255,128+64));*/
  64.      
  65.                     }
  66.                 }
  67. void SecretAntiaim(const CRecvProxyData *pProxData, void *pStruct, void *pOut)
  68. {
  69.     float p = pProxData->m_Value.m_Float;
  70.     if( p > 180.0f )
  71.         p -= 360.0f;
  72.     if( p < -180.0f )
  73.         p += 360.0f;
  74.     if( p < -90)
  75.         p = 270.0f;
  76.     if( p > 90 )
  77.         p = 90.0f;
  78.  
  79. *(float*)pOut = p;
  80. }
  81.  
  82. void CNeeded::NoFlash()
  83. {
  84.  
  85. IMaterial *rm = g_pMaterialSystem->FindMaterial( "particle\\particle_smokegrenade1", NULL );
  86. IMaterial *rm1 = g_pMaterialSystem->FindMaterial( "particle\\screenspace_fog", NULL );
  87. IMaterial *rm2 = g_pMaterialSystem->FindMaterial( "particle\\rain", NULL );
  88. IMaterial* rm3 = g_pMaterialSystem->FindMaterial( "effects\\flashbang", "ClientEffect textures" );
  89. IMaterial* rm4 = g_pMaterialSystem->FindMaterial( "effects\\flashbang_white", "ClientEffect textures" );
  90.  
  91. rm->SetMaterialVarFlag ( MATERIAL_VAR_NO_DRAW, true );
  92. rm1->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, true );
  93. rm2->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, true );
  94. rm3->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, true );
  95. rm4->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, true );
  96. rm->SetMaterialVarFlag ( MATERIAL_VAR_NO_DRAW, false);
  97. rm1->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, false );
  98. rm2->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, false );
  99. rm3->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, false );
  100. rm4->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, false );
  101.  
  102. }
  103. DWORD g_dwOrgHudUpdate;
  104. void __stdcall new_HudUpdate( bool bActive ){
  105.     _asm
  106.     {
  107.         PUSH bActive
  108.         CALL g_dwOrgHudUpdate
  109.     }
  110.         //g_pCvar->FindVar("cl_interp")->SetValue(0.040);
  111.     static bool bOnce = false;
  112.     if( !bOnce ){
  113.         ClientClass *pClass = g_pClient->GetAllClasses();
  114.  
  115.             while( pClass )
  116.             {
  117.                 const char *pszName = pClass->m_pRecvTable->GetName();
  118.                
  119.                 if( !strcmp( pszName, "DT_CSPlayer" ) )
  120.                 {
  121.                     for( int i = 0; i < pClass->m_pRecvTable->m_nProps; i++ )
  122.                     {
  123.                         RecvProp *pProp = pClass->m_pRecvTable->GetProp( i );
  124.                        
  125.                         if( !strcmp( pProp->GetName(), "m_angEyeAngles[0]" ))
  126.                             pProp->SetProxyFn( SecretAntiaim );
  127.                             /*if(gCvar.misc_aaa == 1)
  128.                             {
  129.                                 pProp->SetProxyFn( AAA1 );
  130.                             }
  131.                             else if(gCvar.misc_aaa == 2)
  132.                             {
  133.                                 pProp->SetProxyFn( AAA2 );
  134.                             }
  135.                             else if(gCvar.misc_aaa == 3)
  136.                             {
  137.                                 pProp->SetProxyFn( AAA3 );
  138.                             }
  139.                             else if(gCvar.misc_aaa == 4)
  140.                             {
  141.                                 pProp->SetProxyFn( AAA4 );
  142.                             }*/ //weird aaa
  143.                            
  144.                         /*if( !strcmp( pProp->GetName(), "m_angEyeAngles[1]" ))
  145.                             pProp->SetProxyFn( Y );*/
  146.                     }
  147.                 }
  148.                 pClass = pClass->m_pNext;
  149.             }
  150.     }
  151. }
  152. int GetPlayerHealth(C_BaseEntity* pEntity)
  153. {
  154.     int m_iHealth = *(int*)((DWORD)pEntity + m_offsets.dw_m_iHeahlt());
  155.     return m_iHealth;
  156. }
  157. int GetPlayerArmor(C_BaseEntity* pEntity)
  158. {
  159.     int armor = *(int*)((DWORD)pEntity + 0x141C );
  160.     return armor;
  161. }
  162. DWORD g_dwOrgPaintTraverse;
  163. bool GetHitboxPosition ( int hitbox, Vector& origin, C_BaseEntity *ent, QAngle &angles )
  164. {
  165. if( hitbox < 0 || hitbox >= 20 )
  166. return false;
  167. matrix3x4_t pmatrix[MAXSTUDIOBONES];// done
  168. int index = ent->entindex();
  169. IClientEntity* ClientEntity = g_pEntList->GetClientEntity( index );
  170. if (! ClientEntity )
  171. return false;
  172. int modelget = 0x8c;
  173. short lolmodel = *reinterpret_cast< short* >( reinterpret_cast< int >(ClientEntity) + modelget );
  174. const model_t* model = g_pModelinfo->GetModel(lolmodel);
  175. if(!model)
  176. return false;
  177. studiohdr_t *pStudioHdr = g_pModelinfo->GetStudiomodel( model );
  178. if ( !pStudioHdr )
  179. return false;
  180. if(! ClientEntity->SetupBones( pmatrix, 128, BONE_USED_BY_HITBOX, 0 ) )
  181. return false;
  182. mstudiohitboxset_t *set = pStudioHdr->pHitboxSet( 0 );
  183. if ( !set )
  184. return false;
  185. mstudiobbox_t* pBox = NULL;
  186. pBox = pStudioHdr->pHitbox( 12, 0 );
  187. Vector min, max;
  188. MatrixAngles( pmatrix[ pBox->bone ], angles, origin );
  189. VectorTransform( pBox->bbmin, pmatrix[ pBox->bone ], min );
  190. VectorTransform( pBox->bbmax, pmatrix[ pBox->bone ], max );
  191. origin = ( min + max ) * 0.5f;
  192.  
  193. return true;
  194. }
  195. float __fastcall CNeeded::flGetDistance( Vector vecOriginx,Vector vecOriginy )
  196. {
  197.     double x = vecOriginx[0] - vecOriginy[0];
  198.     double y = vecOriginx[1] - vecOriginy[1];
  199.     double z = vecOriginx[2] - vecOriginy[2];
  200.  
  201.     return (float) sqrt( x*x + y*y + z*z);
  202. }
  203. void __stdcall new_PaintTraverse(vgui::VPANEL vguiPanel, bool forceRepaint, bool allowForce)
  204. {
  205.     _asm
  206.     {
  207.         PUSH allowForce
  208.         PUSH forceRepaint
  209.         PUSH vguiPanel
  210.         MOV ECX, g_pPanel
  211.         CALL g_dwOrgPaintTraverse
  212.     }
  213.  
  214.     //"MatSystemTopPanel"
  215.     int iScreenSize[2];
  216.     g_pEngine->GetScreenSize(iScreenSize[0], iScreenSize[1]);
  217.     int iScreenCenter[2] = { iScreenSize[0] * 0.5, iScreenSize[1] * 0.5 };
  218.      const char* pszPanelName = g_pPanel->GetName(vguiPanel);
  219.     if(pszPanelName[0] == 'M'
  220.                 && pszPanelName[3] == 'S'
  221.                 && pszPanelName[9] == 'T'
  222.                 && pszPanelName[12] == 'P')
  223.     {
  224.  
  225.         // Draw Menu
  226.         new_Menu.DrawMenu();
  227.         new_Menu.InitMenuItems();
  228.  
  229.         // Hack Information
  230.         //gNeeded.DrawGrid(373, 60, 180, 78, 2, c1, c2);
  231.         //gNeeded.PrintText(420,65,COLORCODE(255, 255, 255, 255), " Private Hook ");
  232.         //gNeeded.PrintText(400, 100, COLORCODE(255, 255, 255, 255), "Coded by : SiRG3N");
  233.         //gNeeded.PrintText(420,115,COLORCODE(255, 255, 255, 255)," Version : 0.0.1");
  234.         //gNeeded.blackBorder(373, 60, 180, 80);
  235.         //gNeeded.blackBorder(373, 60, 180, 33);
  236.        
  237.        
  238.         //gNeeded.PrintText(45,3, COLORCODE(0, 255, 0, 255), "Private");
  239.         gNeeded.PrintText(45,225, COLORCODE(0, 255, 0, 255), "Menukey - Insert");
  240.         gNeeded.PrintText(45,240, COLORCODE(0, 255, 0, 255), "Panickey - Delete");
  241.         gNeeded.PrintText(45,255, COLORCODE(0, 255, 0, 255), "Speedkey - Mouse3");
  242.         {
  243.             char szTime[9];
  244.             _strtime(szTime);
  245.             gNeeded.PrintText(45,270, COLORCODE(0, 255, 0, 255), szTime );
  246.         }
  247.  
  248.         //xqz wallhack
  249.       IMaterial* rm1    =  g_pMatSystem->FindMaterial( "particle\\particle_smokegrenade",0,0,0 );
  250.       IMaterial* rm0    =  g_pMatSystem->FindMaterial( "particle\\particle_smokegrenade1",0,0,0 );
  251.       IMaterial* rm3    =  g_pMatSystem->FindMaterial( "effects\\flashbang", "ClientEffect textures",0,0 );
  252.       IMaterial* rm4    =  g_pMatSystem->FindMaterial( "effects\\flashbang_white", "ClientEffect textures",0,0 );
  253.       IMaterial* rm5    =  g_pMatSystem->FindMaterial( "models\\weapons\\v_models\\hands\\v_hands", "Model textures",0,0 );
  254.       IMaterial* rm2 = g_pMatSystem->FindMaterial( "SmokeStack", "ClientEffect textures" );
  255.       if(rm0)rm0->SetMaterialVarFlag(MATERIAL_VAR_NO_DRAW,true);
  256.       if(rm1)rm1->SetMaterialVarFlag(MATERIAL_VAR_NO_DRAW,true);
  257.       if(rm2)rm2->SetMaterialVarFlag(MATERIAL_VAR_NO_DRAW,true);
  258.       if(rm3)rm3->SetMaterialVarFlag(MATERIAL_VAR_NO_DRAW,true); // why do ou have noflash twice? idk :D
  259.       if(rm4)rm4->SetMaterialVarFlag(MATERIAL_VAR_NO_DRAW,true);
  260.        //model t
  261.     IMaterial* pT3 = g_pMatSystem->FindMaterial( "models\\player\\t_arctic\\t_arctic", "Model textures" );
  262.     IMaterial* pT2 = g_pMatSystem->FindMaterial( "models\\player\\t_guerilla\\t_guerilla", "Model textures" );
  263.     IMaterial* pT1 = g_pMatSystem->FindMaterial( "models\\player\\t_leet\\t_leet", "Model textures" );
  264.     IMaterial* pT = g_pMatSystem->FindMaterial( "models\\player\\t_phoenix\\t_phoenix", "Model textures" );
  265.     //models ct
  266.     IMaterial* pCT3 = g_pMatSystem->FindMaterial( "models\\player\\ct_sas\\ct_sas", "Model textures" );
  267.     IMaterial* pCT2 = g_pMatSystem->FindMaterial( "models\\player\\ct_gsg9\\ct_gsg9", "Model textures" );
  268.     IMaterial* pCT1 = g_pMatSystem->FindMaterial( "models\\player\\ct_gign\\ct_gign", "Model textures" );
  269.     IMaterial* pCT = g_pMatSystem->FindMaterial( "models\\player\\ct_urban\\ct_urban", "Model textures" );
  270.         ConVar *consistency = g_pCvar->FindVar("sv_consistency");
  271.         consistency->SetValue(0.0f);
  272. /*      if ( pCT )
  273.         {
  274.             pCT->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, true );
  275.             pCT->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, true );
  276.             pCT->SetMaterialVarFlag( MATERIAL_VAR_HALFLAMBERT, true );
  277.             pCT->SetMaterialVarFlag( MATERIAL_VAR_FLAT, true ); // uncomment me for more FPS       
  278.             consistency->SetValue(0.0f);
  279.         }
  280.         if ( pCT1 )
  281.         {
  282.             pCT1->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, true );
  283.             pCT1->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, true );
  284.             pCT1->SetMaterialVarFlag( MATERIAL_VAR_HALFLAMBERT, true );
  285.             pCT1->SetMaterialVarFlag( MATERIAL_VAR_FLAT, true ); // uncomment me for more FPS              
  286.         }
  287.         if ( pCT2 )
  288.         {
  289.             pCT2->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, true );
  290.             pCT2->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, true );
  291.             pCT2->SetMaterialVarFlag( MATERIAL_VAR_HALFLAMBERT, true );
  292.             pCT2->SetMaterialVarFlag( MATERIAL_VAR_FLAT, true ); // uncomment me for more FPS              
  293.         }
  294.         if ( pCT3 )
  295.         {
  296.             pCT3->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, true );
  297.             pCT3->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, true );
  298.             pCT3->SetMaterialVarFlag( MATERIAL_VAR_HALFLAMBERT, true );
  299.             pCT3->SetMaterialVarFlag( MATERIAL_VAR_FLAT, true ); // uncomment me for more FPS              
  300.         }
  301.  
  302.         if ( pT )
  303.         {
  304.             pT->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, true );
  305.             pT->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, true );
  306.             pT->SetMaterialVarFlag( MATERIAL_VAR_HALFLAMBERT, true );
  307.             pT->SetMaterialVarFlag( MATERIAL_VAR_FLAT, true ); // uncomment me for more FPS            
  308.         }
  309.         if ( pT1 )
  310.         {
  311.             pT1->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, true );
  312.             pT1->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, true );
  313.             pT1->SetMaterialVarFlag( MATERIAL_VAR_HALFLAMBERT, true );
  314.             pT1->SetMaterialVarFlag( MATERIAL_VAR_FLAT, true ); // uncomment me for more FPS
  315.         }
  316.         if ( pT2 )
  317.         {
  318.             pT2->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, true );
  319.             pT2->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, true );
  320.             pT2->SetMaterialVarFlag( MATERIAL_VAR_HALFLAMBERT, true );
  321.             pT2->SetMaterialVarFlag( MATERIAL_VAR_FLAT, true ); // uncomment me for more FPS           
  322.         }
  323.         if ( pT3 )
  324.         {
  325.             pT3->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, true );
  326.             pT3->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, true );
  327.             pT3->SetMaterialVarFlag( MATERIAL_VAR_HALFLAMBERT, true );
  328.             pT3->SetMaterialVarFlag( MATERIAL_VAR_FLAT, true ); // uncomment me for more FPS
  329.         }*/
  330.        
  331.             //NoHands
  332.             IMaterial* vhands  = g_pMatSystem->FindMaterial( "models\\weapons\\v_models\\hands\\v_hands",      
  333.             "Model textures");
  334.             vhands->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, true );
  335.  
  336.      {
  337.          C_BaseEntity*pLocal = (C_BaseEntity*)g_pEntList->GetClientEntity( g_pEngine->GetLocalPlayer() );
  338.                 DWORD colour = COLORCODE(255,255,255,255);
  339.         for(int index = 1; index <= g_pEngine->GetMaxClients(); index++)
  340.         {
  341.         if (g_pEngine->IsInGame())
  342.         {
  343.         if( index != g_pEngine->GetLocalPlayer() )
  344.         {
  345.         C_BaseEntity* pBaseEnt = gNeeded.GetEntityByIndex(index);
  346.         if(pBaseEnt == NULL)
  347.             continue;
  348.         if( pBaseEnt->index == pLocal->index )
  349.             continue;
  350.         if( stricmp( pBaseEnt->GetClientClass()->GetName(), "CCSPlayer" ) == 0 ){
  351.         player_info_t pinfo;
  352.         int health = *(int*)((DWORD)pBaseEnt + m_offsets.dw_m_iHeahlt());
  353.         if( health <= 0 )
  354.             continue;
  355.         if(!IsAlive(pBaseEnt))
  356.             continue;
  357.         if(!g_pEngine->GetPlayerInfo(pBaseEnt->index,&pinfo))
  358.             continue;
  359.         if(pBaseEnt->IsDormant())
  360.             continue;
  361.         Vector m_vecWorld,vScreen;
  362.         gNeeded.GetWorldSpaceCenter(pBaseEnt,m_vecWorld);
  363.         if(gNeeded.WorldToScreen(m_vecWorld,vScreen)){
  364.  
  365.         int teamnum = *(int*)((DWORD)pBaseEnt + m_offsets.dw_m_iteamnum());
  366.         color32* Model = (color32*)((DWORD)pBaseEnt + (DWORD)0x58);
  367.         Vector hpos;
  368.         QAngle notneeded;
  369.         GetHitboxPosition ( 12, hpos, pBaseEnt, notneeded );
  370.         Vector hpos2;
  371.         gNeeded.WorldToScreen(hpos,hpos2);
  372.  
  373.         if(teamnum == 3 && Model)
  374.         {
  375. //Model->r = (byte)0;
  376. //Model->g = (byte)255;
  377. //Model->b = (byte)255;
  378. //Model->a = (byte)255;
  379. //          colour = COLORCODE(0,255,255,200);
  380.  
  381.         }
  382.         else if(teamnum == 2 && Model)
  383.         {
  384. //Model->r = (byte)255;
  385. //Model->g = (byte)255;
  386. //Model->b = (byte)0;
  387. //Model->a = (byte)255;
  388. //          colour = COLORCODE(255,255,0,200);
  389.         }
  390.        
  391.        
  392.  
  393.                     C_BaseCombatWeapon* m_pWeapon = gNospread.GetBaseCombatActiveWeapon( pBaseEnt );
  394.                     if ( m_pWeapon )
  395.                     {
  396.                         const char* szWeapon = g_pModelinfo->GetModelName ( m_pWeapon->GetModel( ) );
  397.  
  398.                         char TehWeapon[100];
  399.                         char m_szPrintName[100];
  400.                         strcpy( TehWeapon, szWeapon );
  401.  
  402.                             if      ( strstr( TehWeapon, "w_rif_ak47.mdl" ) )                   {strcpy( m_szPrintName, "ak47" );}
  403.                             else if ( strstr( TehWeapon, "w_snip_awp.mdl" ) )                   {strcpy( m_szPrintName, "!!AWP!!" );}
  404.                             else if ( strstr( TehWeapon, "w_rif_m4a1_silencer.mdl" ) )          {strcpy( m_szPrintName, "M4a1 Silenced" );}
  405.                             else if ( strstr( TehWeapon, "w_rif_m4a1.mdl" ) )                   {strcpy( m_szPrintName, "M4a1" );}
  406.                             else if ( strstr( TehWeapon, "w_eq_fraggrenade.mdl" ) )             {strcpy( m_szPrintName, "HE" );}
  407.                             else if ( strstr( TehWeapon, "w_eq_flashbang.mdl" ) )               {strcpy( m_szPrintName, "Flash" );}
  408.                             else if ( strstr( TehWeapon, "w_pist_usp.mdl" ) )                   {strcpy( m_szPrintName, "Usp" );}
  409.                             else if ( strstr( TehWeapon, "w_pist_usp_silencer.mdl" ) )          {strcpy( m_szPrintName, "Usp Silenced" );}
  410.                             else if ( strstr( TehWeapon, "w_pist_deagle.mdl" ) )                {strcpy( m_szPrintName, "Deagle" );}
  411.                             else if ( strstr( TehWeapon, "w_eq_smokegrenade.mdl" ) )            {strcpy( m_szPrintName, "Smoke" );}
  412.                             else if ( strstr( TehWeapon, "w_pist_glock.mdl" ) )                 {strcpy( m_szPrintName, "Glock" );}
  413.                             else if ( strstr( TehWeapon, "w_c4.mdl" ) )                         {strcpy( m_szPrintName, "!Bomb!" );}
  414.                             //Draw Weapon
  415.                             //gNeeded.PrintText(vScreen.x+15, vScreen.y+20, CHEAT_WHITE, "Weapon: %s", m_szPrintName );
  416.                     }
  417.                    
  418.  
  419.             //2D Box
  420.             g_pMatSystemSurface->DrawSetColor( (Color(1,1,1,255)) );
  421.             g_pMatSystemSurface->DrawOutlinedRect( vScreen.x - 15, vScreen.y - 15, vScreen.x + 15, vScreen.y + 15 );
  422.  
  423.             //Name ESP
  424.             gNeeded.PrintText2( vScreen.x+15, vScreen.y-10, CHEAT_WHITE, "Name: %s", pinfo.name );
  425.            
  426.             //Health ESP
  427.             gNeeded.PrintText2( vScreen.x+15, vScreen.y+5, CHEAT_WHITE, "Health: %i", GetPlayerHealth(pBaseEnt));
  428.  
  429.             //Armor
  430.             //int armor = *(int*)((DWORD)pBaseEnt + 0x141C );
  431.             //gNeeded.PrintText( vScreen.x+15, vScreen.y+20, CHEAT_WHITE, "Armor: %i", armor);
  432.  
  433.             //Cross ESP
  434.             g_pSurface->DrawSetColor(255,255,255,255);
  435.             g_pSurface->DrawLine(hpos2.x-3,hpos2.y,hpos2.x+3,hpos2.y);
  436.             g_pSurface->DrawLine(hpos2.x,hpos2.y-3,hpos2.x,hpos2.y+3);
  437.  
  438.             //Angle ESP
  439.             QAngle AADETECT;
  440.             AADETECT.x = *(float*) ( ( DWORD )pBaseEnt + ( DWORD )0x1420);
  441.             AADETECT.y = *(float*) ( ( DWORD )pBaseEnt + ( DWORD )0x1424);
  442.             gNeeded.PrintText2( vScreen.x+15, vScreen.y+20, CHEAT_WHITE, "Angle X: %i", AADETECT.x);
  443.             gNeeded.PrintText2( vScreen.x+15, vScreen.y+35, CHEAT_WHITE, "Angle Y: %i", AADETECT.y);
  444.  
  445.             //Normal Crosshair
  446.             //gNeeded.fillRGBA((iScreenCenter[0]) - 25, (iScreenCenter[1]),50,1, CHEAT_WHITE );
  447.             //gNeeded.fillRGBA((iScreenCenter[0]), (iScreenCenter[1]) - 25,1,50, CHEAT_WHITE );
  448.             //gNeeded.fillRGBA((iScreenCenter[0]) - 10, (iScreenCenter[1]),20,1, CHEAT_RED );
  449.             //gNeeded.fillRGBA((iScreenCenter[0]), (iScreenCenter[1]) - 10,1,20, CHEAT_RED );
  450.  
  451.         if(g_Aimbot.m_nTarget != -1)
  452.         {
  453.         //crosshair
  454.         g_pMatSystemSurface->DrawSetColor(255, 255, 255, 255);
  455.         g_pMatSystemSurface->DrawFilledRect(iScreenCenter[0] - 6, iScreenCenter[1], iScreenCenter[0] + 7, iScreenCenter[1] + 1);
  456.         g_pMatSystemSurface->DrawFilledRect(iScreenCenter[0], iScreenCenter[1] - 6, iScreenCenter[0] + 1, iScreenCenter[1] + 7);
  457.         gNeeded.fillRGBA(iScreenCenter[0]-0.5, iScreenCenter[1]-0.5, 3, 3,COLORCODE(0, 0, 0, 255)); // center
  458.         //Lil block
  459.         gNeeded.fillRGBA(iScreenCenter[0] - 7, iScreenCenter[1]  - 1.5, 1,5,COLORCODE(255, 255, 255, 255));// left
  460.         gNeeded.fillRGBA(iScreenCenter[0] + 7, iScreenCenter[1]  - 1.5, 1,5,COLORCODE(255, 255, 255, 255));// right
  461.         gNeeded.fillRGBA(iScreenCenter[0] - 2, iScreenCenter[1]  - 7, 5,1,COLORCODE(255, 255, 255, 255));// up
  462.         gNeeded.fillRGBA(iScreenCenter[0] - 2, iScreenCenter[1]  + 7, 5,1,COLORCODE(255, 255, 255, 255));// down
  463.         }
  464.         else
  465.         {
  466.         //crosshair
  467.         g_pMatSystemSurface->DrawSetColor(255, 255, 255, 255);
  468.         g_pMatSystemSurface->DrawFilledRect(iScreenCenter[0] - 6, iScreenCenter[1], iScreenCenter[0] + 7, iScreenCenter[1] + 1);
  469.         g_pMatSystemSurface->DrawFilledRect(iScreenCenter[0], iScreenCenter[1] - 6, iScreenCenter[0] + 1, iScreenCenter[1] + 7);
  470.         gNeeded.fillRGBA(iScreenCenter[0]-0.5, iScreenCenter[1]-0.5, 3, 3,COLORCODE(0, 0, 0, 255)); // center
  471.         //Lil block yay changed to visible
  472.         gNeeded.fillRGBA(iScreenCenter[0] - 7, iScreenCenter[1]  - 1.5, 1,5,COLORCODE(128, 128, 128, 255));// left
  473.         gNeeded.fillRGBA(iScreenCenter[0] + 7, iScreenCenter[1]  - 1.5, 1,5,COLORCODE(128, 128, 128, 255));// right
  474.         gNeeded.fillRGBA(iScreenCenter[0] - 2, iScreenCenter[1]  - 7, 5,1,COLORCODE(128, 128, 128, 255));// up
  475.         gNeeded.fillRGBA(iScreenCenter[0] - 2, iScreenCenter[1]  + 7, 5,1,COLORCODE(128, 128, 128, 255));// down
  476.         }
  477.         }
  478.         }
  479.         else
  480.         {
  481.         //crosshair
  482.         g_pMatSystemSurface->DrawSetColor(255, 255, 255, 255);
  483.         g_pMatSystemSurface->DrawFilledRect(iScreenCenter[0] - 6, iScreenCenter[1], iScreenCenter[0] + 7, iScreenCenter[1] + 1);
  484.         g_pMatSystemSurface->DrawFilledRect(iScreenCenter[0], iScreenCenter[1] - 6, iScreenCenter[0] + 1, iScreenCenter[1] + 7);
  485.         gNeeded.fillRGBA(iScreenCenter[0]-0.5, iScreenCenter[1]-0.5, 3, 3,COLORCODE(0, 0, 0, 255)); // center
  486.         //Lil block
  487.         gNeeded.fillRGBA(iScreenCenter[0] - 7, iScreenCenter[1]  - 1.5, 1,5,COLORCODE(0, 0, 0, 255));// left
  488.         gNeeded.fillRGBA(iScreenCenter[0] + 7, iScreenCenter[1]  - 1.5, 1,5,COLORCODE(0, 0, 0, 255));// right
  489.         gNeeded.fillRGBA(iScreenCenter[0] - 2, iScreenCenter[1]  - 7, 5,1,COLORCODE(0, 0, 0, 255));// up
  490.         gNeeded.fillRGBA(iScreenCenter[0] - 2, iScreenCenter[1]  + 7, 5,1,COLORCODE(0, 0, 0, 255));// down
  491.         }
  492.         }
  493.         else
  494.         {
  495.         //crosshair
  496.         g_pMatSystemSurface->DrawSetColor(255, 255, 255, 255);
  497.         g_pMatSystemSurface->DrawFilledRect(iScreenCenter[0] - 6, iScreenCenter[1], iScreenCenter[0] + 7, iScreenCenter[1] + 1);
  498.         g_pMatSystemSurface->DrawFilledRect(iScreenCenter[0], iScreenCenter[1] - 6, iScreenCenter[0] + 1, iScreenCenter[1] + 7);
  499.         gNeeded.fillRGBA(iScreenCenter[0]-0.5, iScreenCenter[1]-0.5, 3, 3,COLORCODE(255, 255, 255, 255)); // center
  500.         //Lil block
  501.         gNeeded.fillRGBA(iScreenCenter[0] - 7, iScreenCenter[1]  - 1.5, 1,5,COLORCODE(255, 255, 255, 255));// left
  502.         gNeeded.fillRGBA(iScreenCenter[0] + 7, iScreenCenter[1]  - 1.5, 1,5,COLORCODE(255, 255, 255, 255));// right
  503.         gNeeded.fillRGBA(iScreenCenter[0] - 2, iScreenCenter[1]  - 7, 5,1,COLORCODE(255, 255, 255, 255));// up
  504.         gNeeded.fillRGBA(iScreenCenter[0] - 2, iScreenCenter[1]  + 7, 5,1,COLORCODE(255, 255, 255, 255));// down
  505.          
  506.         }
  507.         }
  508.         }
  509.         }
  510.  
  511.         //sv_cheats lowbypass
  512.         ConVar *sv_cheats = g_pCvar->FindVar( "sv_cheats" );
  513.         sv_cheats->SetValue(1);
  514.      
  515. /*for ( int index = 0; index < g_pEntList->GetHighestEntityIndex(); index++ )
  516.     {
  517.  
  518.         if ( index == g_pEngine->GetLocalPlayer() )
  519.             continue;
  520.  
  521.         IClientEntity* ClientEntity = (IClientEntity*)g_pEntList->GetClientEntity( index );
  522.  
  523.         if ( ClientEntity == NULL || ClientEntity->IsDormant() )
  524.             continue;
  525.  
  526.         CBaseEntity* TargetEntity = (CBaseEntity*)ClientEntity->GetBaseEntity();
  527.  
  528.         if ( TargetEntity == NULL || TargetEntity->IsDormant() )
  529.             continue;
  530.        
  531.  
  532.         const char* modelName = g_pModelinfo->GetModelName(TargetEntity->GetModel());
  533.  
  534.         if( modelName )
  535.         {
  536.             //Starting of Weapon Entity Detection...
  537.             if( strstr( modelName, "w_" ) )
  538.             {  
  539.                 CBaseCombatWeapon* pWeap = static_cast<CBaseCombatWeapon*>(TargetEntity);
  540.  
  541.                 if( pWeap )
  542.                 {
  543.                     Vector vWeapScreen, vWeapWorldPos;
  544.                     gNeeded.GetWorldSpaceCenter( TargetEntity, vWeapWorldPos );
  545.  
  546.                     if ( gNeeded.WorldToScreen( vWeapWorldPos, vWeapScreen ) )
  547.                     {
  548.                         int m_iState = *(int*)((DWORD)pWeap + 0x924);
  549.  
  550.                         if(m_iState == WEAPON_NOT_CARRIED)
  551.                             {
  552.                                 if(strstr(modelName, "knife"))
  553.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,true,"%s","Knife");
  554.                                 if(strstr(modelName, "m4"))
  555.                                 {
  556.                                     if(strstr(modelName,"silenced"))
  557.                                         gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","M4A1 Silenced");
  558.                                     else
  559.                                         gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","M4A1");
  560.                                 }
  561.                                 if(strstr(modelName, "ak"))
  562.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","AK-47");
  563.                                 if(strstr(modelName, "tmp"))
  564.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","TMP");
  565.                                 if(strstr(modelName, "aug"))
  566.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","AUG");
  567.                                 if(strstr(modelName, "g3sg1"))
  568.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","G3SG1");
  569.                                 if(strstr(modelName, "m3super90"))
  570.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","M3");
  571.                                 if(strstr(modelName, "mac10"))
  572.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Mac 10");
  573.                                 if(strstr(modelName, "p90"))
  574.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","P90");
  575.                                 if(strstr(modelName, "scout"))
  576.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Scout");
  577.                                 if(strstr(modelName, "sg500"))
  578.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","SG500");
  579.                                 if(strstr(modelName, "usp"))
  580.                                 {
  581.                                     if(strstr(modelName,"silenced"))
  582.                                         gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","USP Silenced");
  583.                                     else
  584.                                         gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","USP");
  585.                                 }
  586.                                 if(strstr(modelName, "elites"))
  587.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Dual Elites");
  588.                                 if(strstr(modelName, "ump45"))
  589.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","UMP45");
  590.                                 if(strstr(modelName, "awp"))
  591.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","AWP");
  592.                                 if(strstr(modelName, "famas"))
  593.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Famas");
  594.                                 if(strstr(modelName, "galil"))
  595.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Galil");
  596.                                 if(strstr(modelName, "mp5"))
  597.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Mp5");
  598.                                 if(strstr(modelName, "m249para"))
  599.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","M249");
  600.                                 if(strstr(modelName, "sg552"))
  601.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","SG552");
  602.                                 if(strstr(modelName, "xm1014"))
  603.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","XM1014");
  604.                                 if(strstr(modelName, "glock18"))
  605.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Glock");
  606.                                 if(strstr(modelName, "deagle"))
  607.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Deagle");
  608.                                 if(strstr(modelName, "p228"))
  609.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","P228");
  610.                                 if(strstr(modelName, "fiveseven"))
  611.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Fiveseven");
  612.                                 if(strstr(modelName, "c4"))
  613.                                 {
  614.                                     if(strstr(modelName,"planted"))
  615.                                         gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,0,0,false,"%s","***Bomb Planted***");
  616.                                     else
  617.                                         gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","***Bomb***");
  618.                                 }
  619.                                 if(strstr(modelName, "frag"))
  620.                                 {
  621.                                     if(strstr(modelName,"thrown"))
  622.                                         gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,0,0,false,"%s","Frag Grenade Thrown");
  623.                                     else
  624.                                         gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Frag Grenade");
  625.                                 }
  626.                                 if(strstr(modelName, "smoke"))
  627.                                 {
  628.                                     if(strstr(modelName,"thrown"))
  629.                                         gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,0,0,false,"%s","Smokegrenade Thrown");
  630.                                     else
  631.                                         gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Smokegrenade");
  632.                                 }
  633.                                 if(strstr(modelName, "flash"))
  634.                                 {
  635.                                     if(strstr(modelName,"thrown"))
  636.                                         gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,0,0,false,"%s","Flashbang Thrown");
  637.                                     else
  638.                                         gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Flashbang");
  639.                                 }
  640.                                 if(strstr(modelName, "defuser"))
  641.                                     gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,true,"%s","Defuse Kit");*/
  642.                                    
  643.                         }
  644.                     }
  645.                     //}
  646.                     //}
  647.                     //}
  648.                
  649.                     //}
  650.                 //}
  651.             //}
  652.     //}
  653.     //}    
  654. //VisNorecoil & others shits
  655. DWORD g_dwOrgEngineSBegin;
  656. void __stdcall new_EngineStats_BeginFrame()
  657. {
  658.     CViewSetup *pView = NULL; CViewVectors * pVectors = NULL;
  659.     _asm
  660.     {
  661.         push ebx
  662.         lea ebx, [esi+8h]
  663.         mov pView, ebx
  664.         pop ebx
  665.     }
  666.     C_BaseEntity* pLocal = g_pEntList->GetClientEntity(g_pEngine->GetLocalPlayer() )->GetBaseEntity();
  667.     QAngle* pPunchAngle = ( QAngle* )( (DWORD)pLocal + m_offsets.GetPunchAngle());
  668.     QAngle pAngle = *pPunchAngle;
  669.     pView->angles -= pAngle;
  670.  
  671.     _asm
  672.     {
  673.         CALL g_dwOrgEngineSBegin
  674.     }    
  675. }
  676.  
  677. CUserCmd* __stdcall new_GetUserCmd( int sequence_number )
  678. {
  679.  
  680. DWORD GetUserCmd = *( DWORD* )( ( DWORD ) g_pInput + 0xB4 ) + ( sequence_number  % 90 << 6 );
  681. CUserCmd *pCmd = ( CUserCmd* ) GetUserCmd;
  682.  
  683. pCmd->random_seed = 165;
  684. pCmd->command_number = 2087;
  685.  
  686. return pCmd;
  687. }
  688. DWORD g_dwOrgCreateMove;
  689. void __stdcall new_CreateMove(int sequence_number, float input_sample_frametime, bool active)
  690. {
  691.     _asm
  692.     {
  693.         PUSH active
  694.         PUSH input_sample_frametime
  695.         PUSH sequence_number
  696.         CALL g_dwOrgCreateMove
  697.     }
  698.  
  699.     //credits to...
  700.     if ( !g_pEngine->IsInGame() || !g_pInput )
  701.         return;
  702.    
  703.     CInput::CVerifiedUserCmd *g_pVerifiedCommands = *(CInput::CVerifiedUserCmd**)( (DWORD)g_pInput + 0xB8 );
  704.  
  705.     if ( !g_pVerifiedCommands )
  706.         return;
  707.  
  708.     CInput::CVerifiedUserCmd *pVerified = &g_pVerifiedCommands[ sequence_number % MULTIPLAYER_BACKUP ];
  709.    
  710.     CUserCmd* pCmd = new_GetUserCmd(sequence_number);
  711.  
  712.     if ( !pCmd || !pVerified)
  713.         return;
  714.  
  715.  
  716.  
  717.     //Autopistol
  718.     if (pCmd->buttons & IN_ATTACK)
  719.       {
  720.         static bool bAttack = false;
  721.         if (bAttack)    pCmd->buttons |=  IN_ATTACK;
  722.     else
  723.         pCmd->buttons &= ~IN_ATTACK;
  724.         bAttack = !bAttack;
  725.       }
  726.  
  727.     //Aimbot
  728.     g_Aimbot.Main(pCmd);
  729.  
  730.  
  731.     Vector vMove(pCmd->forwardmove, pCmd->sidemove, pCmd->upmove);
  732.     float flSpeed = sqrt(vMove.x * vMove.x + vMove.y * vMove.y), flYaw;
  733.     QAngle qMove, qRealView(pCmd->viewangles);
  734.     VectorAngles(vMove, qMove);
  735.     static bool bShoot = true;
  736.  
  737.     //Get some needed funcs :D
  738.     C_BaseEntity*pBaseEntity = (C_BaseEntity*)g_pEntList->GetClientEntity( g_pEngine->GetLocalPlayer() );
  739.     int iFlags = *(PINT)((DWORD)pBaseEntity + m_offsets.dw_m_fFlags());
  740.  
  741.     //niggajump$$$
  742.         if( pCmd->buttons &IN_JUMP && !( iFlags&FL_ONGROUND ) && !( iFlags&FL_PARTIALGROUND ) )
  743.         pCmd->buttons &= ~IN_JUMP;
  744.    
  745.     /*
  746.     //NoRecoil
  747.     QAngle punchAngle = *( QAngle* )( (DWORD)pBaseEntity + m_offsets.GetPunchAngle());
  748.     pCmd->viewangles.x  -= (punchAngle.x * 1.97f);
  749.     pCmd->viewangles.y  -= (punchAngle.y * 1.97f);
  750.     pCmd->viewangles.z  -= (punchAngle.z * 1.97f);
  751.  
  752.  
  753.     //NoSpread
  754.     QAngle Fix;
  755.     gNospread.GetSpreadFix(pCmd->random_seed,pCmd->viewangles,Fix);
  756.     pCmd->viewangles += Fix;*/
  757.  
  758.        
  759.  
  760.  
  761.    
  762.     //antiaim
  763.     if(pCmd->buttons &IN_ATTACK)
  764.     {
  765.     QAngle punchAngle = *(QAngle*)((DWORD)pBaseEntity + m_offsets.GetPunchAngle());
  766.     QAngle qRecoil = (punchAngle *1.97f);
  767.     QAngle SpreadFix;
  768.     float fTime = g_pEngine->Time();
  769.     gNospread.GetSpreadFix(pCmd->random_seed,pCmd->viewangles,SpreadFix);
  770.     pCmd->viewangles.x = (180 - pCmd->viewangles.x) - qRecoil.x + SpreadFix.x;
  771.     pCmd->viewangles.y = -((180 - pCmd->viewangles.y) - (-qRecoil.y) + SpreadFix.y);
  772.     }
  773.     else
  774.     {
  775.         //-- angles if not attacking --//
  776.         pCmd->viewangles.x = 180;
  777.         pCmd->viewangles.y -= 180;
  778.         pCmd->viewangles.z = 0;
  779.      }
  780.  
  781.     //W - S fix
  782.     flYaw = DEG2RAD(pCmd->viewangles.y - qRealView.y + qMove.y);
  783.     pCmd->forwardmove = -cos(flYaw) * flSpeed;
  784.     pCmd->sidemove = sin(flYaw) * flSpeed;
  785.  
  786.     //validate checksum
  787.     pVerified->m_cmd = *pCmd;
  788.     pVerified->m_crc =  pCmd->GetChecksum();
  789. }
  790.  
  791. //Engine Chams. Btw crashes idk why you can check Johnny (cuz of materials i think they are no found) the materials indeed is here (lol already where i put them) : https://royalhack.ru/forum/attachment.php?attachmentid=1716&d=1250845967
  792. // & of course you can put another materials as model transparent ect... (like a real material hack) It works like this (an engine) chams (d3d other thing),wallhack (d3d other thing too).
  793. IMaterial* g_pTextureRed;
  794. IMaterial* g_pTextureYellow;
  795. IMaterial* g_pTextureBlue;
  796. IMaterial* g_pTextureGreen;
  797. IMaterial* g_pTextureWhite;
  798. IMaterial* g_pTextureWhite2;
  799. DWORD dw_OrgDrawModelEx;
  800. int __stdcall new_DrawModelEx( ModelRenderInfo_t &pInfo )
  801. {
  802.         _asm
  803.  
  804.         {
  805.                 PUSH pInfo
  806.                 CALL dw_OrgDrawModelEx
  807.         }
  808.     if(g_pTextureRed == NULL)
  809.         g_pTextureRed = g_pMatSystem->FindMaterial("models\\textures\\Red", TEXTURE_GROUP_MODEL);
  810.     if(g_pTextureYellow == NULL)
  811.         g_pTextureYellow = g_pMatSystem->FindMaterial("models\\textures\\Yellow", TEXTURE_GROUP_MODEL);
  812.     else
  813.     {
  814.         if(g_pTextureYellow->GetMaterialVarFlag(MATERIAL_VAR_IGNOREZ) == FALSE)
  815.             g_pTextureYellow->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, TRUE);
  816.     }
  817.     if(g_pTextureBlue == NULL)
  818.         g_pTextureBlue = g_pMatSystem->FindMaterial("models\\textures\\Blue", TEXTURE_GROUP_MODEL);
  819.     if(g_pTextureGreen == NULL)
  820.         g_pTextureGreen = g_pMatSystem->FindMaterial("models\\textures\\Green", TEXTURE_GROUP_MODEL);
  821.     else
  822.     {
  823.         if(g_pTextureGreen->GetMaterialVarFlag(MATERIAL_VAR_IGNOREZ) == FALSE)
  824.             g_pTextureGreen->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, TRUE);
  825.     }
  826.     if(g_pTextureWhite == NULL)
  827.         g_pTextureWhite = g_pMatSystem->FindMaterial("models\\textures\\White", TEXTURE_GROUP_MODEL);
  828.     if(g_pTextureWhite2 == NULL)
  829.         g_pTextureWhite2 = g_pTextureWhite;
  830.     else
  831.     {
  832.         if(g_pTextureWhite2->GetMaterialVarFlag(MATERIAL_VAR_IGNOREZ) == FALSE)
  833.             g_pTextureWhite2->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, TRUE);
  834.     }
  835.     if( pInfo.pModel )
  836.     {
  837.         const char* pszModelName = g_pModelinfo->GetModelName(pInfo.pModel);
  838.  
  839.         if(strstr(pszModelName, "models/player"))
  840.         {
  841.             IMaterial* pTexture = g_pTextureWhite;
  842.             IMaterial* pWallHackTexture = g_pTextureWhite2;
  843.  
  844.             CBaseEntity* pModelEntity = (CBaseEntity*)g_pEntList->GetClientEntity(pInfo.entity_index);
  845.             if(pModelEntity)
  846.             {
  847.                 player_info_t pinfo;
  848.                 int iLifestate = *(int*)((DWORD)pModelEntity + m_offsets.dw_m_lifestats());
  849.  
  850.                 if( iLifestate == LIFE_ALIVE
  851.                 &&  g_pEngine->GetPlayerInfo(pInfo.entity_index, &pinfo))
  852.                 {
  853.                     int iTeam = *(int*)((DWORD)pModelEntity + m_offsets.dw_m_iteamnum());
  854.  
  855.                     if(iTeam == 2)
  856.                     {
  857.                         pTexture = g_pTextureRed;
  858.                         pWallHackTexture = g_pTextureYellow;
  859.                     }
  860.                     else if(iTeam == 3)
  861.                     {
  862.                         pTexture = g_pTextureBlue;
  863.                         pWallHackTexture = g_pTextureGreen;
  864.                     }
  865.                 }
  866.                 else
  867.                 {
  868.                     pTexture = g_pTextureWhite;
  869.                     pWallHackTexture = g_pTextureWhite2;
  870.                 }
  871.             }
  872.             else
  873.             {
  874.                 if(strstr(pszModelName, "models/player/t_"))
  875.                 {
  876.                     pTexture = g_pTextureRed;
  877.                     pWallHackTexture = g_pTextureYellow;
  878.                 }
  879.                 if(strstr(pszModelName, "models/player/ct_"))
  880.                 {
  881.                     pTexture = g_pTextureBlue;
  882.                     pWallHackTexture = g_pTextureGreen;
  883.                 }
  884.             }
  885.             g_pModelRender->ForcedMaterialOverride(pWallHackTexture);
  886.             g_pModelRender->DrawModelEx(pInfo);
  887.             g_pModelRender->ForcedMaterialOverride(pTexture);
  888.         }
  889.         else
  890.         {
  891.             g_pModelRender->ForcedMaterialOverride(NULL);
  892.         }
  893.     }
  894.     int iRet = g_pModelRender->DrawModelEx(pInfo);
  895.     g_pModelRender->ForcedMaterialOverride(NULL);
  896.  
  897.     return iRet;
  898. }
  899.  
  900.  
  901. #pragma once
  902. #include "main.h"
  903.  
  904. cAimbot g_Aimbot;
  905. //others things
  906. #define AddHitboxVec( VEC_ORIGIN, VEC_ANGLE, VEC_OFFSET );
  907. /*#ifdef CLIENT_DLL
  908. BEGIN_PREDICTION_DATA( CBaseCombatWeapon )
  909.     DEFINE_PRED_FIELD( m_nNextThinkTick, FIELD_INTEGER, FTYPEDESC_INSENDTABLE ),
  910.     DEFINE_PRED_FIELD( m_hOwner, FIELD_EHANDLE, FTYPEDESC_INSENDTABLE ),
  911.     DEFINE_PRED_FIELD_TOL( m_flNextPrimaryAttack, FIELD_FLOAT, FTYPEDESC_INSENDTABLE, TD_MSECTOLERANCE ),  
  912. END_PREDICTION_DATA()
  913. #endif*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement