Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "main.h"
- int dead, me, killer;
- bool IsAlive(C_BaseEntity* pEnt)
- {
- char lifestate = *(PCHAR)((DWORD)pEnt + m_offsets.dw_m_lifestats());
- if(!(lifestate == LIFE_ALIVE))
- return false;
- return true;
- }
- void CustomBorder2(int x,int y,int w, int h, DWORD dwBorderColor)
- {
- gNeeded.fillRGBA( x-1, y, 4, h-2,dwBorderColor );//left
- }
- void CustomBorder3(int x,int y,int w, int h, DWORD dwBorderColor)
- {
- gNeeded.fillRGBA( (x-3)+w, y, 4, h-2,dwBorderColor);//right
- }
- void CustomBorder4(int x,int y,int w, int h, DWORD dwBorderColor)
- {
- gNeeded.fillRGBA( x-1, y, 3, h-2 ,dwBorderColor);//left
- }
- void CustomBorder5(int x,int y,int w, int h, DWORD dwBorderColor)
- {
- gNeeded.fillRGBA( (x-2)+w, y, 3, h-2 ,dwBorderColor);//right
- }
- void CustomBorder(int x,int y,int w, int h, DWORD dwBorderColor){
- gNeeded.fillRGBA( x-2, y-2, w+4, 2 ,dwBorderColor); //top
- gNeeded.fillRGBA( x-2, y, 1, h-2 ,dwBorderColor );//left
- gNeeded.fillRGBA( x+w+1, y, 1, h-2 ,dwBorderColor); //right
- gNeeded.fillRGBA( x-2, y+h-2, w+4, 2 ,dwBorderColor);}//down
- void DrawBoundingBox(C_BaseEntity *pEnt,DWORD colour,int index){
- Vector mon, nom;
- DWORD dwGetColor = COLORCODE(255,255,255,255);
- nom = pEnt->GetAbsOrigin();
- int flags = *(int*)((DWORD)pEnt + m_offsets.dw_m_fFlags());
- if(flags & FL_DUCKING)
- mon = nom + Vector( 0, 0, 50.f );
- else
- mon = nom + Vector( 0, 0, 70.f );
- Vector bot, top;
- player_info_t pInfo;
- IClientEntity* pBaseEntClient;
- Vector vScreen; //see my name
- Vector vWorldPosition; //see my name
- Vector vPlayerHead; //see my name
- pBaseEntClient = g_pEntList->GetClientEntity(index);
- g_pEngine->GetPlayerInfo(pBaseEntClient->entindex(), &pInfo);
- C_BaseEntity* pBaseEnt;
- pBaseEnt = pBaseEntClient->GetBaseEntity();
- if( gNeeded.TransformVector( nom, bot ) && gNeeded.TransformVector( mon, top ) ){
- float h = ( bot.y - top.y );
- float w = h / 5.f;
- int health = *(int*)((DWORD)pEnt + m_offsets.dw_m_iHeahlt());
- int armor = *(int*)((DWORD)pEnt + 0x141C );
- int punchx = *(int*)((DWORD)pEnt + m_offsets.dw_m_vecPunchAngle_x());
- //Box ESP,Health,Armor Bar by xutax
- /*CustomBorder(top.x - w,top.y, w * 2, ( bot.y - top.y ), colour );
- CustomBorder2(top.x - w,top.y, w * 2, ( bot.y - top.y ), COLORCODE(0,0,0,128));
- CustomBorder3(top.x - w,top.y, w * 2, ( bot.y - top.y ), COLORCODE(0,0,0,128));
- CustomBorder4(top.x - w,top.y, w * 2, ( bot.y - top.y ) * health / 100, COLORCODE(255,255,255,128+64));
- CustomBorder5(top.x - w,top.y, w * 2, ( bot.y - top.y ) * armor / 100, COLORCODE(255,255,255,128+64));*/
- }
- }
- void SecretAntiaim(const CRecvProxyData *pProxData, void *pStruct, void *pOut)
- {
- float p = pProxData->m_Value.m_Float;
- if( p > 180.0f )
- p -= 360.0f;
- if( p < -180.0f )
- p += 360.0f;
- if( p < -90)
- p = 270.0f;
- if( p > 90 )
- p = 90.0f;
- *(float*)pOut = p;
- }
- void CNeeded::NoFlash()
- {
- IMaterial *rm = g_pMaterialSystem->FindMaterial( "particle\\particle_smokegrenade1", NULL );
- IMaterial *rm1 = g_pMaterialSystem->FindMaterial( "particle\\screenspace_fog", NULL );
- IMaterial *rm2 = g_pMaterialSystem->FindMaterial( "particle\\rain", NULL );
- IMaterial* rm3 = g_pMaterialSystem->FindMaterial( "effects\\flashbang", "ClientEffect textures" );
- IMaterial* rm4 = g_pMaterialSystem->FindMaterial( "effects\\flashbang_white", "ClientEffect textures" );
- rm->SetMaterialVarFlag ( MATERIAL_VAR_NO_DRAW, true );
- rm1->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, true );
- rm2->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, true );
- rm3->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, true );
- rm4->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, true );
- rm->SetMaterialVarFlag ( MATERIAL_VAR_NO_DRAW, false);
- rm1->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, false );
- rm2->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, false );
- rm3->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, false );
- rm4->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, false );
- }
- DWORD g_dwOrgHudUpdate;
- void __stdcall new_HudUpdate( bool bActive ){
- _asm
- {
- PUSH bActive
- CALL g_dwOrgHudUpdate
- }
- //g_pCvar->FindVar("cl_interp")->SetValue(0.040);
- static bool bOnce = false;
- if( !bOnce ){
- ClientClass *pClass = g_pClient->GetAllClasses();
- while( pClass )
- {
- const char *pszName = pClass->m_pRecvTable->GetName();
- if( !strcmp( pszName, "DT_CSPlayer" ) )
- {
- for( int i = 0; i < pClass->m_pRecvTable->m_nProps; i++ )
- {
- RecvProp *pProp = pClass->m_pRecvTable->GetProp( i );
- if( !strcmp( pProp->GetName(), "m_angEyeAngles[0]" ))
- pProp->SetProxyFn( SecretAntiaim );
- /*if(gCvar.misc_aaa == 1)
- {
- pProp->SetProxyFn( AAA1 );
- }
- else if(gCvar.misc_aaa == 2)
- {
- pProp->SetProxyFn( AAA2 );
- }
- else if(gCvar.misc_aaa == 3)
- {
- pProp->SetProxyFn( AAA3 );
- }
- else if(gCvar.misc_aaa == 4)
- {
- pProp->SetProxyFn( AAA4 );
- }*/ //weird aaa
- /*if( !strcmp( pProp->GetName(), "m_angEyeAngles[1]" ))
- pProp->SetProxyFn( Y );*/
- }
- }
- pClass = pClass->m_pNext;
- }
- }
- }
- int GetPlayerHealth(C_BaseEntity* pEntity)
- {
- int m_iHealth = *(int*)((DWORD)pEntity + m_offsets.dw_m_iHeahlt());
- return m_iHealth;
- }
- int GetPlayerArmor(C_BaseEntity* pEntity)
- {
- int armor = *(int*)((DWORD)pEntity + 0x141C );
- return armor;
- }
- DWORD g_dwOrgPaintTraverse;
- bool GetHitboxPosition ( int hitbox, Vector& origin, C_BaseEntity *ent, QAngle &angles )
- {
- if( hitbox < 0 || hitbox >= 20 )
- return false;
- matrix3x4_t pmatrix[MAXSTUDIOBONES];// done
- int index = ent->entindex();
- IClientEntity* ClientEntity = g_pEntList->GetClientEntity( index );
- if (! ClientEntity )
- return false;
- int modelget = 0x8c;
- short lolmodel = *reinterpret_cast< short* >( reinterpret_cast< int >(ClientEntity) + modelget );
- const model_t* model = g_pModelinfo->GetModel(lolmodel);
- if(!model)
- return false;
- studiohdr_t *pStudioHdr = g_pModelinfo->GetStudiomodel( model );
- if ( !pStudioHdr )
- return false;
- if(! ClientEntity->SetupBones( pmatrix, 128, BONE_USED_BY_HITBOX, 0 ) )
- return false;
- mstudiohitboxset_t *set = pStudioHdr->pHitboxSet( 0 );
- if ( !set )
- return false;
- mstudiobbox_t* pBox = NULL;
- pBox = pStudioHdr->pHitbox( 12, 0 );
- Vector min, max;
- MatrixAngles( pmatrix[ pBox->bone ], angles, origin );
- VectorTransform( pBox->bbmin, pmatrix[ pBox->bone ], min );
- VectorTransform( pBox->bbmax, pmatrix[ pBox->bone ], max );
- origin = ( min + max ) * 0.5f;
- return true;
- }
- float __fastcall CNeeded::flGetDistance( Vector vecOriginx,Vector vecOriginy )
- {
- double x = vecOriginx[0] - vecOriginy[0];
- double y = vecOriginx[1] - vecOriginy[1];
- double z = vecOriginx[2] - vecOriginy[2];
- return (float) sqrt( x*x + y*y + z*z);
- }
- void __stdcall new_PaintTraverse(vgui::VPANEL vguiPanel, bool forceRepaint, bool allowForce)
- {
- _asm
- {
- PUSH allowForce
- PUSH forceRepaint
- PUSH vguiPanel
- MOV ECX, g_pPanel
- CALL g_dwOrgPaintTraverse
- }
- //"MatSystemTopPanel"
- int iScreenSize[2];
- g_pEngine->GetScreenSize(iScreenSize[0], iScreenSize[1]);
- int iScreenCenter[2] = { iScreenSize[0] * 0.5, iScreenSize[1] * 0.5 };
- const char* pszPanelName = g_pPanel->GetName(vguiPanel);
- if(pszPanelName[0] == 'M'
- && pszPanelName[3] == 'S'
- && pszPanelName[9] == 'T'
- && pszPanelName[12] == 'P')
- {
- // Draw Menu
- new_Menu.DrawMenu();
- new_Menu.InitMenuItems();
- // Hack Information
- //gNeeded.DrawGrid(373, 60, 180, 78, 2, c1, c2);
- //gNeeded.PrintText(420,65,COLORCODE(255, 255, 255, 255), " Private Hook ");
- //gNeeded.PrintText(400, 100, COLORCODE(255, 255, 255, 255), "Coded by : SiRG3N");
- //gNeeded.PrintText(420,115,COLORCODE(255, 255, 255, 255)," Version : 0.0.1");
- //gNeeded.blackBorder(373, 60, 180, 80);
- //gNeeded.blackBorder(373, 60, 180, 33);
- //gNeeded.PrintText(45,3, COLORCODE(0, 255, 0, 255), "Private");
- gNeeded.PrintText(45,225, COLORCODE(0, 255, 0, 255), "Menukey - Insert");
- gNeeded.PrintText(45,240, COLORCODE(0, 255, 0, 255), "Panickey - Delete");
- gNeeded.PrintText(45,255, COLORCODE(0, 255, 0, 255), "Speedkey - Mouse3");
- {
- char szTime[9];
- _strtime(szTime);
- gNeeded.PrintText(45,270, COLORCODE(0, 255, 0, 255), szTime );
- }
- //xqz wallhack
- IMaterial* rm1 = g_pMatSystem->FindMaterial( "particle\\particle_smokegrenade",0,0,0 );
- IMaterial* rm0 = g_pMatSystem->FindMaterial( "particle\\particle_smokegrenade1",0,0,0 );
- IMaterial* rm3 = g_pMatSystem->FindMaterial( "effects\\flashbang", "ClientEffect textures",0,0 );
- IMaterial* rm4 = g_pMatSystem->FindMaterial( "effects\\flashbang_white", "ClientEffect textures",0,0 );
- IMaterial* rm5 = g_pMatSystem->FindMaterial( "models\\weapons\\v_models\\hands\\v_hands", "Model textures",0,0 );
- IMaterial* rm2 = g_pMatSystem->FindMaterial( "SmokeStack", "ClientEffect textures" );
- if(rm0)rm0->SetMaterialVarFlag(MATERIAL_VAR_NO_DRAW,true);
- if(rm1)rm1->SetMaterialVarFlag(MATERIAL_VAR_NO_DRAW,true);
- if(rm2)rm2->SetMaterialVarFlag(MATERIAL_VAR_NO_DRAW,true);
- if(rm3)rm3->SetMaterialVarFlag(MATERIAL_VAR_NO_DRAW,true); // why do ou have noflash twice? idk :D
- if(rm4)rm4->SetMaterialVarFlag(MATERIAL_VAR_NO_DRAW,true);
- //model t
- IMaterial* pT3 = g_pMatSystem->FindMaterial( "models\\player\\t_arctic\\t_arctic", "Model textures" );
- IMaterial* pT2 = g_pMatSystem->FindMaterial( "models\\player\\t_guerilla\\t_guerilla", "Model textures" );
- IMaterial* pT1 = g_pMatSystem->FindMaterial( "models\\player\\t_leet\\t_leet", "Model textures" );
- IMaterial* pT = g_pMatSystem->FindMaterial( "models\\player\\t_phoenix\\t_phoenix", "Model textures" );
- //models ct
- IMaterial* pCT3 = g_pMatSystem->FindMaterial( "models\\player\\ct_sas\\ct_sas", "Model textures" );
- IMaterial* pCT2 = g_pMatSystem->FindMaterial( "models\\player\\ct_gsg9\\ct_gsg9", "Model textures" );
- IMaterial* pCT1 = g_pMatSystem->FindMaterial( "models\\player\\ct_gign\\ct_gign", "Model textures" );
- IMaterial* pCT = g_pMatSystem->FindMaterial( "models\\player\\ct_urban\\ct_urban", "Model textures" );
- ConVar *consistency = g_pCvar->FindVar("sv_consistency");
- consistency->SetValue(0.0f);
- /* if ( pCT )
- {
- pCT->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, true );
- pCT->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, true );
- pCT->SetMaterialVarFlag( MATERIAL_VAR_HALFLAMBERT, true );
- pCT->SetMaterialVarFlag( MATERIAL_VAR_FLAT, true ); // uncomment me for more FPS
- consistency->SetValue(0.0f);
- }
- if ( pCT1 )
- {
- pCT1->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, true );
- pCT1->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, true );
- pCT1->SetMaterialVarFlag( MATERIAL_VAR_HALFLAMBERT, true );
- pCT1->SetMaterialVarFlag( MATERIAL_VAR_FLAT, true ); // uncomment me for more FPS
- }
- if ( pCT2 )
- {
- pCT2->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, true );
- pCT2->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, true );
- pCT2->SetMaterialVarFlag( MATERIAL_VAR_HALFLAMBERT, true );
- pCT2->SetMaterialVarFlag( MATERIAL_VAR_FLAT, true ); // uncomment me for more FPS
- }
- if ( pCT3 )
- {
- pCT3->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, true );
- pCT3->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, true );
- pCT3->SetMaterialVarFlag( MATERIAL_VAR_HALFLAMBERT, true );
- pCT3->SetMaterialVarFlag( MATERIAL_VAR_FLAT, true ); // uncomment me for more FPS
- }
- if ( pT )
- {
- pT->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, true );
- pT->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, true );
- pT->SetMaterialVarFlag( MATERIAL_VAR_HALFLAMBERT, true );
- pT->SetMaterialVarFlag( MATERIAL_VAR_FLAT, true ); // uncomment me for more FPS
- }
- if ( pT1 )
- {
- pT1->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, true );
- pT1->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, true );
- pT1->SetMaterialVarFlag( MATERIAL_VAR_HALFLAMBERT, true );
- pT1->SetMaterialVarFlag( MATERIAL_VAR_FLAT, true ); // uncomment me for more FPS
- }
- if ( pT2 )
- {
- pT2->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, true );
- pT2->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, true );
- pT2->SetMaterialVarFlag( MATERIAL_VAR_HALFLAMBERT, true );
- pT2->SetMaterialVarFlag( MATERIAL_VAR_FLAT, true ); // uncomment me for more FPS
- }
- if ( pT3 )
- {
- pT3->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, true );
- pT3->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, true );
- pT3->SetMaterialVarFlag( MATERIAL_VAR_HALFLAMBERT, true );
- pT3->SetMaterialVarFlag( MATERIAL_VAR_FLAT, true ); // uncomment me for more FPS
- }*/
- //NoHands
- IMaterial* vhands = g_pMatSystem->FindMaterial( "models\\weapons\\v_models\\hands\\v_hands",
- "Model textures");
- vhands->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, true );
- {
- C_BaseEntity*pLocal = (C_BaseEntity*)g_pEntList->GetClientEntity( g_pEngine->GetLocalPlayer() );
- DWORD colour = COLORCODE(255,255,255,255);
- for(int index = 1; index <= g_pEngine->GetMaxClients(); index++)
- {
- if (g_pEngine->IsInGame())
- {
- if( index != g_pEngine->GetLocalPlayer() )
- {
- C_BaseEntity* pBaseEnt = gNeeded.GetEntityByIndex(index);
- if(pBaseEnt == NULL)
- continue;
- if( pBaseEnt->index == pLocal->index )
- continue;
- if( stricmp( pBaseEnt->GetClientClass()->GetName(), "CCSPlayer" ) == 0 ){
- player_info_t pinfo;
- int health = *(int*)((DWORD)pBaseEnt + m_offsets.dw_m_iHeahlt());
- if( health <= 0 )
- continue;
- if(!IsAlive(pBaseEnt))
- continue;
- if(!g_pEngine->GetPlayerInfo(pBaseEnt->index,&pinfo))
- continue;
- if(pBaseEnt->IsDormant())
- continue;
- Vector m_vecWorld,vScreen;
- gNeeded.GetWorldSpaceCenter(pBaseEnt,m_vecWorld);
- if(gNeeded.WorldToScreen(m_vecWorld,vScreen)){
- int teamnum = *(int*)((DWORD)pBaseEnt + m_offsets.dw_m_iteamnum());
- color32* Model = (color32*)((DWORD)pBaseEnt + (DWORD)0x58);
- Vector hpos;
- QAngle notneeded;
- GetHitboxPosition ( 12, hpos, pBaseEnt, notneeded );
- Vector hpos2;
- gNeeded.WorldToScreen(hpos,hpos2);
- if(teamnum == 3 && Model)
- {
- //Model->r = (byte)0;
- //Model->g = (byte)255;
- //Model->b = (byte)255;
- //Model->a = (byte)255;
- // colour = COLORCODE(0,255,255,200);
- }
- else if(teamnum == 2 && Model)
- {
- //Model->r = (byte)255;
- //Model->g = (byte)255;
- //Model->b = (byte)0;
- //Model->a = (byte)255;
- // colour = COLORCODE(255,255,0,200);
- }
- C_BaseCombatWeapon* m_pWeapon = gNospread.GetBaseCombatActiveWeapon( pBaseEnt );
- if ( m_pWeapon )
- {
- const char* szWeapon = g_pModelinfo->GetModelName ( m_pWeapon->GetModel( ) );
- char TehWeapon[100];
- char m_szPrintName[100];
- strcpy( TehWeapon, szWeapon );
- if ( strstr( TehWeapon, "w_rif_ak47.mdl" ) ) {strcpy( m_szPrintName, "ak47" );}
- else if ( strstr( TehWeapon, "w_snip_awp.mdl" ) ) {strcpy( m_szPrintName, "!!AWP!!" );}
- else if ( strstr( TehWeapon, "w_rif_m4a1_silencer.mdl" ) ) {strcpy( m_szPrintName, "M4a1 Silenced" );}
- else if ( strstr( TehWeapon, "w_rif_m4a1.mdl" ) ) {strcpy( m_szPrintName, "M4a1" );}
- else if ( strstr( TehWeapon, "w_eq_fraggrenade.mdl" ) ) {strcpy( m_szPrintName, "HE" );}
- else if ( strstr( TehWeapon, "w_eq_flashbang.mdl" ) ) {strcpy( m_szPrintName, "Flash" );}
- else if ( strstr( TehWeapon, "w_pist_usp.mdl" ) ) {strcpy( m_szPrintName, "Usp" );}
- else if ( strstr( TehWeapon, "w_pist_usp_silencer.mdl" ) ) {strcpy( m_szPrintName, "Usp Silenced" );}
- else if ( strstr( TehWeapon, "w_pist_deagle.mdl" ) ) {strcpy( m_szPrintName, "Deagle" );}
- else if ( strstr( TehWeapon, "w_eq_smokegrenade.mdl" ) ) {strcpy( m_szPrintName, "Smoke" );}
- else if ( strstr( TehWeapon, "w_pist_glock.mdl" ) ) {strcpy( m_szPrintName, "Glock" );}
- else if ( strstr( TehWeapon, "w_c4.mdl" ) ) {strcpy( m_szPrintName, "!Bomb!" );}
- //Draw Weapon
- //gNeeded.PrintText(vScreen.x+15, vScreen.y+20, CHEAT_WHITE, "Weapon: %s", m_szPrintName );
- }
- //2D Box
- g_pMatSystemSurface->DrawSetColor( (Color(1,1,1,255)) );
- g_pMatSystemSurface->DrawOutlinedRect( vScreen.x - 15, vScreen.y - 15, vScreen.x + 15, vScreen.y + 15 );
- //Name ESP
- gNeeded.PrintText2( vScreen.x+15, vScreen.y-10, CHEAT_WHITE, "Name: %s", pinfo.name );
- //Health ESP
- gNeeded.PrintText2( vScreen.x+15, vScreen.y+5, CHEAT_WHITE, "Health: %i", GetPlayerHealth(pBaseEnt));
- //Armor
- //int armor = *(int*)((DWORD)pBaseEnt + 0x141C );
- //gNeeded.PrintText( vScreen.x+15, vScreen.y+20, CHEAT_WHITE, "Armor: %i", armor);
- //Cross ESP
- g_pSurface->DrawSetColor(255,255,255,255);
- g_pSurface->DrawLine(hpos2.x-3,hpos2.y,hpos2.x+3,hpos2.y);
- g_pSurface->DrawLine(hpos2.x,hpos2.y-3,hpos2.x,hpos2.y+3);
- //Angle ESP
- QAngle AADETECT;
- AADETECT.x = *(float*) ( ( DWORD )pBaseEnt + ( DWORD )0x1420);
- AADETECT.y = *(float*) ( ( DWORD )pBaseEnt + ( DWORD )0x1424);
- gNeeded.PrintText2( vScreen.x+15, vScreen.y+20, CHEAT_WHITE, "Angle X: %i", AADETECT.x);
- gNeeded.PrintText2( vScreen.x+15, vScreen.y+35, CHEAT_WHITE, "Angle Y: %i", AADETECT.y);
- //Normal Crosshair
- //gNeeded.fillRGBA((iScreenCenter[0]) - 25, (iScreenCenter[1]),50,1, CHEAT_WHITE );
- //gNeeded.fillRGBA((iScreenCenter[0]), (iScreenCenter[1]) - 25,1,50, CHEAT_WHITE );
- //gNeeded.fillRGBA((iScreenCenter[0]) - 10, (iScreenCenter[1]),20,1, CHEAT_RED );
- //gNeeded.fillRGBA((iScreenCenter[0]), (iScreenCenter[1]) - 10,1,20, CHEAT_RED );
- if(g_Aimbot.m_nTarget != -1)
- {
- //crosshair
- g_pMatSystemSurface->DrawSetColor(255, 255, 255, 255);
- g_pMatSystemSurface->DrawFilledRect(iScreenCenter[0] - 6, iScreenCenter[1], iScreenCenter[0] + 7, iScreenCenter[1] + 1);
- g_pMatSystemSurface->DrawFilledRect(iScreenCenter[0], iScreenCenter[1] - 6, iScreenCenter[0] + 1, iScreenCenter[1] + 7);
- gNeeded.fillRGBA(iScreenCenter[0]-0.5, iScreenCenter[1]-0.5, 3, 3,COLORCODE(0, 0, 0, 255)); // center
- //Lil block
- gNeeded.fillRGBA(iScreenCenter[0] - 7, iScreenCenter[1] - 1.5, 1,5,COLORCODE(255, 255, 255, 255));// left
- gNeeded.fillRGBA(iScreenCenter[0] + 7, iScreenCenter[1] - 1.5, 1,5,COLORCODE(255, 255, 255, 255));// right
- gNeeded.fillRGBA(iScreenCenter[0] - 2, iScreenCenter[1] - 7, 5,1,COLORCODE(255, 255, 255, 255));// up
- gNeeded.fillRGBA(iScreenCenter[0] - 2, iScreenCenter[1] + 7, 5,1,COLORCODE(255, 255, 255, 255));// down
- }
- else
- {
- //crosshair
- g_pMatSystemSurface->DrawSetColor(255, 255, 255, 255);
- g_pMatSystemSurface->DrawFilledRect(iScreenCenter[0] - 6, iScreenCenter[1], iScreenCenter[0] + 7, iScreenCenter[1] + 1);
- g_pMatSystemSurface->DrawFilledRect(iScreenCenter[0], iScreenCenter[1] - 6, iScreenCenter[0] + 1, iScreenCenter[1] + 7);
- gNeeded.fillRGBA(iScreenCenter[0]-0.5, iScreenCenter[1]-0.5, 3, 3,COLORCODE(0, 0, 0, 255)); // center
- //Lil block yay changed to visible
- gNeeded.fillRGBA(iScreenCenter[0] - 7, iScreenCenter[1] - 1.5, 1,5,COLORCODE(128, 128, 128, 255));// left
- gNeeded.fillRGBA(iScreenCenter[0] + 7, iScreenCenter[1] - 1.5, 1,5,COLORCODE(128, 128, 128, 255));// right
- gNeeded.fillRGBA(iScreenCenter[0] - 2, iScreenCenter[1] - 7, 5,1,COLORCODE(128, 128, 128, 255));// up
- gNeeded.fillRGBA(iScreenCenter[0] - 2, iScreenCenter[1] + 7, 5,1,COLORCODE(128, 128, 128, 255));// down
- }
- }
- }
- else
- {
- //crosshair
- g_pMatSystemSurface->DrawSetColor(255, 255, 255, 255);
- g_pMatSystemSurface->DrawFilledRect(iScreenCenter[0] - 6, iScreenCenter[1], iScreenCenter[0] + 7, iScreenCenter[1] + 1);
- g_pMatSystemSurface->DrawFilledRect(iScreenCenter[0], iScreenCenter[1] - 6, iScreenCenter[0] + 1, iScreenCenter[1] + 7);
- gNeeded.fillRGBA(iScreenCenter[0]-0.5, iScreenCenter[1]-0.5, 3, 3,COLORCODE(0, 0, 0, 255)); // center
- //Lil block
- gNeeded.fillRGBA(iScreenCenter[0] - 7, iScreenCenter[1] - 1.5, 1,5,COLORCODE(0, 0, 0, 255));// left
- gNeeded.fillRGBA(iScreenCenter[0] + 7, iScreenCenter[1] - 1.5, 1,5,COLORCODE(0, 0, 0, 255));// right
- gNeeded.fillRGBA(iScreenCenter[0] - 2, iScreenCenter[1] - 7, 5,1,COLORCODE(0, 0, 0, 255));// up
- gNeeded.fillRGBA(iScreenCenter[0] - 2, iScreenCenter[1] + 7, 5,1,COLORCODE(0, 0, 0, 255));// down
- }
- }
- else
- {
- //crosshair
- g_pMatSystemSurface->DrawSetColor(255, 255, 255, 255);
- g_pMatSystemSurface->DrawFilledRect(iScreenCenter[0] - 6, iScreenCenter[1], iScreenCenter[0] + 7, iScreenCenter[1] + 1);
- g_pMatSystemSurface->DrawFilledRect(iScreenCenter[0], iScreenCenter[1] - 6, iScreenCenter[0] + 1, iScreenCenter[1] + 7);
- gNeeded.fillRGBA(iScreenCenter[0]-0.5, iScreenCenter[1]-0.5, 3, 3,COLORCODE(255, 255, 255, 255)); // center
- //Lil block
- gNeeded.fillRGBA(iScreenCenter[0] - 7, iScreenCenter[1] - 1.5, 1,5,COLORCODE(255, 255, 255, 255));// left
- gNeeded.fillRGBA(iScreenCenter[0] + 7, iScreenCenter[1] - 1.5, 1,5,COLORCODE(255, 255, 255, 255));// right
- gNeeded.fillRGBA(iScreenCenter[0] - 2, iScreenCenter[1] - 7, 5,1,COLORCODE(255, 255, 255, 255));// up
- gNeeded.fillRGBA(iScreenCenter[0] - 2, iScreenCenter[1] + 7, 5,1,COLORCODE(255, 255, 255, 255));// down
- }
- }
- }
- }
- //sv_cheats lowbypass
- ConVar *sv_cheats = g_pCvar->FindVar( "sv_cheats" );
- sv_cheats->SetValue(1);
- /*for ( int index = 0; index < g_pEntList->GetHighestEntityIndex(); index++ )
- {
- if ( index == g_pEngine->GetLocalPlayer() )
- continue;
- IClientEntity* ClientEntity = (IClientEntity*)g_pEntList->GetClientEntity( index );
- if ( ClientEntity == NULL || ClientEntity->IsDormant() )
- continue;
- CBaseEntity* TargetEntity = (CBaseEntity*)ClientEntity->GetBaseEntity();
- if ( TargetEntity == NULL || TargetEntity->IsDormant() )
- continue;
- const char* modelName = g_pModelinfo->GetModelName(TargetEntity->GetModel());
- if( modelName )
- {
- //Starting of Weapon Entity Detection...
- if( strstr( modelName, "w_" ) )
- {
- CBaseCombatWeapon* pWeap = static_cast<CBaseCombatWeapon*>(TargetEntity);
- if( pWeap )
- {
- Vector vWeapScreen, vWeapWorldPos;
- gNeeded.GetWorldSpaceCenter( TargetEntity, vWeapWorldPos );
- if ( gNeeded.WorldToScreen( vWeapWorldPos, vWeapScreen ) )
- {
- int m_iState = *(int*)((DWORD)pWeap + 0x924);
- if(m_iState == WEAPON_NOT_CARRIED)
- {
- if(strstr(modelName, "knife"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,true,"%s","Knife");
- if(strstr(modelName, "m4"))
- {
- if(strstr(modelName,"silenced"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","M4A1 Silenced");
- else
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","M4A1");
- }
- if(strstr(modelName, "ak"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","AK-47");
- if(strstr(modelName, "tmp"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","TMP");
- if(strstr(modelName, "aug"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","AUG");
- if(strstr(modelName, "g3sg1"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","G3SG1");
- if(strstr(modelName, "m3super90"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","M3");
- if(strstr(modelName, "mac10"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Mac 10");
- if(strstr(modelName, "p90"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","P90");
- if(strstr(modelName, "scout"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Scout");
- if(strstr(modelName, "sg500"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","SG500");
- if(strstr(modelName, "usp"))
- {
- if(strstr(modelName,"silenced"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","USP Silenced");
- else
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","USP");
- }
- if(strstr(modelName, "elites"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Dual Elites");
- if(strstr(modelName, "ump45"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","UMP45");
- if(strstr(modelName, "awp"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","AWP");
- if(strstr(modelName, "famas"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Famas");
- if(strstr(modelName, "galil"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Galil");
- if(strstr(modelName, "mp5"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Mp5");
- if(strstr(modelName, "m249para"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","M249");
- if(strstr(modelName, "sg552"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","SG552");
- if(strstr(modelName, "xm1014"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","XM1014");
- if(strstr(modelName, "glock18"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Glock");
- if(strstr(modelName, "deagle"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Deagle");
- if(strstr(modelName, "p228"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","P228");
- if(strstr(modelName, "fiveseven"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Fiveseven");
- if(strstr(modelName, "c4"))
- {
- if(strstr(modelName,"planted"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,0,0,false,"%s","***Bomb Planted***");
- else
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","***Bomb***");
- }
- if(strstr(modelName, "frag"))
- {
- if(strstr(modelName,"thrown"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,0,0,false,"%s","Frag Grenade Thrown");
- else
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Frag Grenade");
- }
- if(strstr(modelName, "smoke"))
- {
- if(strstr(modelName,"thrown"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,0,0,false,"%s","Smokegrenade Thrown");
- else
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Smokegrenade");
- }
- if(strstr(modelName, "flash"))
- {
- if(strstr(modelName,"thrown"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,0,0,false,"%s","Flashbang Thrown");
- else
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,false,"%s","Flashbang");
- }
- if(strstr(modelName, "defuser"))
- gNeeded.DrawStringEntity(vWeapScreen.x,vWeapScreen.y,255,255,255,true,"%s","Defuse Kit");*/
- }
- }
- //}
- //}
- //}
- //}
- //}
- //}
- //}
- //}
- //VisNorecoil & others shits
- DWORD g_dwOrgEngineSBegin;
- void __stdcall new_EngineStats_BeginFrame()
- {
- CViewSetup *pView = NULL; CViewVectors * pVectors = NULL;
- _asm
- {
- push ebx
- lea ebx, [esi+8h]
- mov pView, ebx
- pop ebx
- }
- C_BaseEntity* pLocal = g_pEntList->GetClientEntity(g_pEngine->GetLocalPlayer() )->GetBaseEntity();
- QAngle* pPunchAngle = ( QAngle* )( (DWORD)pLocal + m_offsets.GetPunchAngle());
- QAngle pAngle = *pPunchAngle;
- pView->angles -= pAngle;
- _asm
- {
- CALL g_dwOrgEngineSBegin
- }
- }
- CUserCmd* __stdcall new_GetUserCmd( int sequence_number )
- {
- DWORD GetUserCmd = *( DWORD* )( ( DWORD ) g_pInput + 0xB4 ) + ( sequence_number % 90 << 6 );
- CUserCmd *pCmd = ( CUserCmd* ) GetUserCmd;
- pCmd->random_seed = 165;
- pCmd->command_number = 2087;
- return pCmd;
- }
- DWORD g_dwOrgCreateMove;
- void __stdcall new_CreateMove(int sequence_number, float input_sample_frametime, bool active)
- {
- _asm
- {
- PUSH active
- PUSH input_sample_frametime
- PUSH sequence_number
- CALL g_dwOrgCreateMove
- }
- //credits to...
- if ( !g_pEngine->IsInGame() || !g_pInput )
- return;
- CInput::CVerifiedUserCmd *g_pVerifiedCommands = *(CInput::CVerifiedUserCmd**)( (DWORD)g_pInput + 0xB8 );
- if ( !g_pVerifiedCommands )
- return;
- CInput::CVerifiedUserCmd *pVerified = &g_pVerifiedCommands[ sequence_number % MULTIPLAYER_BACKUP ];
- CUserCmd* pCmd = new_GetUserCmd(sequence_number);
- if ( !pCmd || !pVerified)
- return;
- //Autopistol
- if (pCmd->buttons & IN_ATTACK)
- {
- static bool bAttack = false;
- if (bAttack) pCmd->buttons |= IN_ATTACK;
- else
- pCmd->buttons &= ~IN_ATTACK;
- bAttack = !bAttack;
- }
- //Aimbot
- g_Aimbot.Main(pCmd);
- Vector vMove(pCmd->forwardmove, pCmd->sidemove, pCmd->upmove);
- float flSpeed = sqrt(vMove.x * vMove.x + vMove.y * vMove.y), flYaw;
- QAngle qMove, qRealView(pCmd->viewangles);
- VectorAngles(vMove, qMove);
- static bool bShoot = true;
- //Get some needed funcs :D
- C_BaseEntity*pBaseEntity = (C_BaseEntity*)g_pEntList->GetClientEntity( g_pEngine->GetLocalPlayer() );
- int iFlags = *(PINT)((DWORD)pBaseEntity + m_offsets.dw_m_fFlags());
- //niggajump$$$
- if( pCmd->buttons &IN_JUMP && !( iFlags&FL_ONGROUND ) && !( iFlags&FL_PARTIALGROUND ) )
- pCmd->buttons &= ~IN_JUMP;
- /*
- //NoRecoil
- QAngle punchAngle = *( QAngle* )( (DWORD)pBaseEntity + m_offsets.GetPunchAngle());
- pCmd->viewangles.x -= (punchAngle.x * 1.97f);
- pCmd->viewangles.y -= (punchAngle.y * 1.97f);
- pCmd->viewangles.z -= (punchAngle.z * 1.97f);
- //NoSpread
- QAngle Fix;
- gNospread.GetSpreadFix(pCmd->random_seed,pCmd->viewangles,Fix);
- pCmd->viewangles += Fix;*/
- //antiaim
- if(pCmd->buttons &IN_ATTACK)
- {
- QAngle punchAngle = *(QAngle*)((DWORD)pBaseEntity + m_offsets.GetPunchAngle());
- QAngle qRecoil = (punchAngle *1.97f);
- QAngle SpreadFix;
- float fTime = g_pEngine->Time();
- gNospread.GetSpreadFix(pCmd->random_seed,pCmd->viewangles,SpreadFix);
- pCmd->viewangles.x = (180 - pCmd->viewangles.x) - qRecoil.x + SpreadFix.x;
- pCmd->viewangles.y = -((180 - pCmd->viewangles.y) - (-qRecoil.y) + SpreadFix.y);
- }
- else
- {
- //-- angles if not attacking --//
- pCmd->viewangles.x = 180;
- pCmd->viewangles.y -= 180;
- pCmd->viewangles.z = 0;
- }
- //W - S fix
- flYaw = DEG2RAD(pCmd->viewangles.y - qRealView.y + qMove.y);
- pCmd->forwardmove = -cos(flYaw) * flSpeed;
- pCmd->sidemove = sin(flYaw) * flSpeed;
- //validate checksum
- pVerified->m_cmd = *pCmd;
- pVerified->m_crc = pCmd->GetChecksum();
- }
- //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
- // & 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).
- IMaterial* g_pTextureRed;
- IMaterial* g_pTextureYellow;
- IMaterial* g_pTextureBlue;
- IMaterial* g_pTextureGreen;
- IMaterial* g_pTextureWhite;
- IMaterial* g_pTextureWhite2;
- DWORD dw_OrgDrawModelEx;
- int __stdcall new_DrawModelEx( ModelRenderInfo_t &pInfo )
- {
- _asm
- {
- PUSH pInfo
- CALL dw_OrgDrawModelEx
- }
- if(g_pTextureRed == NULL)
- g_pTextureRed = g_pMatSystem->FindMaterial("models\\textures\\Red", TEXTURE_GROUP_MODEL);
- if(g_pTextureYellow == NULL)
- g_pTextureYellow = g_pMatSystem->FindMaterial("models\\textures\\Yellow", TEXTURE_GROUP_MODEL);
- else
- {
- if(g_pTextureYellow->GetMaterialVarFlag(MATERIAL_VAR_IGNOREZ) == FALSE)
- g_pTextureYellow->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, TRUE);
- }
- if(g_pTextureBlue == NULL)
- g_pTextureBlue = g_pMatSystem->FindMaterial("models\\textures\\Blue", TEXTURE_GROUP_MODEL);
- if(g_pTextureGreen == NULL)
- g_pTextureGreen = g_pMatSystem->FindMaterial("models\\textures\\Green", TEXTURE_GROUP_MODEL);
- else
- {
- if(g_pTextureGreen->GetMaterialVarFlag(MATERIAL_VAR_IGNOREZ) == FALSE)
- g_pTextureGreen->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, TRUE);
- }
- if(g_pTextureWhite == NULL)
- g_pTextureWhite = g_pMatSystem->FindMaterial("models\\textures\\White", TEXTURE_GROUP_MODEL);
- if(g_pTextureWhite2 == NULL)
- g_pTextureWhite2 = g_pTextureWhite;
- else
- {
- if(g_pTextureWhite2->GetMaterialVarFlag(MATERIAL_VAR_IGNOREZ) == FALSE)
- g_pTextureWhite2->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, TRUE);
- }
- if( pInfo.pModel )
- {
- const char* pszModelName = g_pModelinfo->GetModelName(pInfo.pModel);
- if(strstr(pszModelName, "models/player"))
- {
- IMaterial* pTexture = g_pTextureWhite;
- IMaterial* pWallHackTexture = g_pTextureWhite2;
- CBaseEntity* pModelEntity = (CBaseEntity*)g_pEntList->GetClientEntity(pInfo.entity_index);
- if(pModelEntity)
- {
- player_info_t pinfo;
- int iLifestate = *(int*)((DWORD)pModelEntity + m_offsets.dw_m_lifestats());
- if( iLifestate == LIFE_ALIVE
- && g_pEngine->GetPlayerInfo(pInfo.entity_index, &pinfo))
- {
- int iTeam = *(int*)((DWORD)pModelEntity + m_offsets.dw_m_iteamnum());
- if(iTeam == 2)
- {
- pTexture = g_pTextureRed;
- pWallHackTexture = g_pTextureYellow;
- }
- else if(iTeam == 3)
- {
- pTexture = g_pTextureBlue;
- pWallHackTexture = g_pTextureGreen;
- }
- }
- else
- {
- pTexture = g_pTextureWhite;
- pWallHackTexture = g_pTextureWhite2;
- }
- }
- else
- {
- if(strstr(pszModelName, "models/player/t_"))
- {
- pTexture = g_pTextureRed;
- pWallHackTexture = g_pTextureYellow;
- }
- if(strstr(pszModelName, "models/player/ct_"))
- {
- pTexture = g_pTextureBlue;
- pWallHackTexture = g_pTextureGreen;
- }
- }
- g_pModelRender->ForcedMaterialOverride(pWallHackTexture);
- g_pModelRender->DrawModelEx(pInfo);
- g_pModelRender->ForcedMaterialOverride(pTexture);
- }
- else
- {
- g_pModelRender->ForcedMaterialOverride(NULL);
- }
- }
- int iRet = g_pModelRender->DrawModelEx(pInfo);
- g_pModelRender->ForcedMaterialOverride(NULL);
- return iRet;
- }
- #pragma once
- #include "main.h"
- cAimbot g_Aimbot;
- //others things
- #define AddHitboxVec( VEC_ORIGIN, VEC_ANGLE, VEC_OFFSET );
- /*#ifdef CLIENT_DLL
- BEGIN_PREDICTION_DATA( CBaseCombatWeapon )
- DEFINE_PRED_FIELD( m_nNextThinkTick, FIELD_INTEGER, FTYPEDESC_INSENDTABLE ),
- DEFINE_PRED_FIELD( m_hOwner, FIELD_EHANDLE, FTYPEDESC_INSENDTABLE ),
- DEFINE_PRED_FIELD_TOL( m_flNextPrimaryAttack, FIELD_FLOAT, FTYPEDESC_INSENDTABLE, TD_MSECTOLERANCE ),
- END_PREDICTION_DATA()
- #endif*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement