Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void pSilent ( CUserCmd* cmd )
- {
- //_asm INT 3
- Angle oldView = cmd->viewangles;
- float oldSidemove = cmd->sidemove;
- float oldForwardmove = cmd->forwardmove;
- static Vector aimAngles;
- /////////// Do all aimbot / nospread / norecoil stuff here
- DWORD flags = pClientEntList->GetClientEntity ( pEngine->GetLocalPlayer ( ) )->GetFlags ( );
- //PrintConsole ( "CURRENT FLAGS: %i %i\n", true, flags, 123 );
- int shotsfired = pClientEntList->GetClientEntity ( pEngine->GetLocalPlayer ( ) )->ShotsFired ( );
- if ( gCvars.aimbot.bEnabled && (cmd->buttons & IN_ATTACK || gCvars.aimbot.bAutoshoot) && (flags & FL_ONGROUND) && cAim.bestTarget ( aimAngles ) )
- {
- if ( gCvars.aimbot.bEnableRCS && shotsfired > 2 )
- {
- Vector vecPunchAngle = cEng.GetPunchAngle ( pClientEntList->GetClientEntity ( pEngine->GetLocalPlayer ( ) ) );
- aimAngles -= vecPunchAngle * gCvars.aimbot.fRCSmultiplier;
- }
- cmd->viewangles = aimAngles;
- if ( gCvars.aimbot.bAutoshoot )
- cmd->buttons |= IN_ATTACK;
- }
- ///////////////////////////
- static BYTE bSPPattern [] = {0xB3, 0x01, 0x8B, 0x01, 0x8B, 0x40, 0x18, 0xFF, 0xD0, 0x84, 0xC0};
- static char bSPMask [] = "xxxxxxxxxxx";
- static BYTE* bSendPacket = ( BYTE* )(cEng.Pattern ( ( DWORD )GetModuleHandleA ( "engine.dll" ), 0xFFFFFFFF, bSPPattern, bSPMask )) + 0x01;
- IClientEntity* entWpn = pClientEntList->GetClientEntityFromHandle ( pClientEntList->GetClientEntity ( pEngine->GetLocalPlayer ( ) )->GetActiveWeaponHandle ( ) );
- if ( !entWpn )
- return;
- float fNextAttack = *( float* )(( DWORD )entWpn + 0x159C);
- int* iper_tick = ( int* )(( DWORD )GetModuleHandleA ( "client.dll" ) + 0x4A36F7C);
- if ( !iper_tick )
- return;
- int interval_per_tick = *iper_tick;
- float flServerTime = ( float )(pClientEntList->GetClientEntity ( pEngine->GetLocalPlayer ( ) )->readOffset<int> ( 0x17cc )) * interval_per_tick;
- bool bBulletTime = true;
- if ( fNextAttack > flServerTime )
- bBulletTime = false;
- DWORD oldProtect, tmp;
- VirtualProtect ( bSendPacket, 1, PAGE_EXECUTE_READWRITE, &oldProtect );
- if ( cmd->buttons & IN_ATTACK && bBulletTime )
- {
- *bSendPacket = false;
- } else
- {
- *bSendPacket = true;
- cmd->viewangles = oldView;
- cmd->sidemove = oldSidemove;
- cmd->forwardmove = oldForwardmove;
- }
- VirtualProtect ( bSendPacket, 1, oldProtect, &tmp );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement