-
Автор темы
- #1
cocaine 4.0
если убираю пердеж не все читы работают че делать кто поможет шедро награжу
код
bool Startup()
{
m_pClient = ( IBaseClientDLL* )QueryInterface( XorStr( "client.dll" ), XorStr( "VClient" ) );
if( !m_pClient )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VClient' interface!" ) );
return false;
}
m_pEntList = ( IClientEntityList* )QueryInterface( XorStr( "client.dll" ), XorStr( "VClientEntityList" ) );
if( !m_pEntList )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VClientEntityList' interface!" ) );
return false;
}
m_pGameMovement = ( IGameMovement* )QueryInterface( XorStr( "client.dll" ), XorStr( "GameMovement" ) );
if( !m_pGameMovement )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'GameMovement' interface!" ) );
return false;
}
m_pPrediction = ( IPrediction* )QueryInterface( XorStr( "client.dll" ), XorStr( "VClientPrediction" ) );
if( !m_pPrediction )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VClientPrediction' interface!" ) );
return false;
}
m_pEngine = ( IVEngineClient* )QueryInterface( XorStr( "engine.dll" ), XorStr( "VEngineClient" ) );
if( !m_pEngine )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VEngineClient' interface!" ) );
return false;
}
m_pModelInfoClient = ( IVModelInfoClient* )QueryInterface( XorStr( "engine.dll" ), XorStr( "VModelInfoClient" ) );
if( !m_pModelInfoClient )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VModelInfoClient' interface!" ) );
return false;
}
m_pRenderView = ( IVRenderView* )QueryInterface( XorStr( "engine.dll" ), XorStr( "VEngineRenderView" ) );
if( !m_pRenderView )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VEngineRenderView' interface!" ) );
return false;
}
m_pModelRender = ( IVModelRender* )QueryInterface( XorStr( "engine.dll" ), XorStr( "VEngineModel" ) );
if( !m_pModelRender )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VEngineModel' interface!" ) );
return false;
}
m_pEngineTrace = ( IEngineTrace* )QueryInterface( XorStr( "engine.dll" ), XorStr( "EngineTraceClient" ) );
if( !m_pEngineTrace )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'EngineTraceClient' interface!" ) );
return false;
}
m_pCvar = ( ICvar* )QueryInterface( XorStr( "engine.dll" ), XorStr( "VEngineCvar003" ), true );
if( !m_pCvar )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VEngineCvar003' interface!" ) );
return false;
}
m_pPhysicsSurfaceProps = ( IPhysicsSurfaceProps* )QueryInterface( XorStr( "vphysics.dll" ), XorStr( "VPhysicsSurfaceProps" ) );
if( !m_pPhysicsSurfaceProps )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VPhysicsSurfaceProps' interface!" ) );
return false;
}
m_pMatSystem = ( IMaterialSystem* )QueryInterface( XorStr( "materialsystem.dll" ), XorStr( "VMaterialSystem" ) );
if( !m_pMatSystem )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VMaterialSystem' interface!" ) );
return false;
}
m_pGlobalVars = **( CGlobalVars*** )( Memory::PatternScan( XorStr( "client.dll" ), XorStr( "A3 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 54 24 34" ) ) + 1 );
if( !m_pGlobalVars )
{
DPRINT( XorStr( "[Source::Startup] Can't find 'global vars'!" ) );
return false;
}
m_pInput = **( IInput*** )( Memory::PatternScan( XorStr( "client.dll" ), XorStr( "8B 0D ?? ?? ?? ?? 8B 11 50 8B 44 24 10" ) ) + 2 );
if( !m_pInput )
{
DPRINT( XorStr( "[Source::Startup] Can't find 'input'!" ) );
return false;
}
m_pDevice = Valve::Dx9Device()->m_pD3DDevice;
if( !m_pDevice )
{
DPRINT( XorStr( "[Source::Startup] Can't get 'device'!" ) );
return false;
}
m_pTargetInput = std::make_shared< Input::Win32 >();
if( !m_pTargetInput->Capture() )
{
DPRINT( XorStr( "[Source::Startup] Can't capture input!" ) );
return false;
}
m_pNetVarManager = std::make_shared< Source::NetVarManager >();
if( !m_pNetVarManager->Create( m_pClient ) )
{
DPRINT( XorStr( "[Source::Startup] Can't create netvar manager!" ) );
return false;
}
m_pRenderer = std::make_shared< Direct3D9::Renderer >();
if( !m_pRenderer->Create( m_pDevice ) )
{
DPRINT( XorStr( "[Source::Startup] Can't create renderer!" ) );
return false;
}
m_hFont = m_pRenderer->CreateFont( XorStr( "Tahoma" ), 8, FONT_CREATE_BOLD | FONT_CREATE_DROPSHADOW );
if( m_hFont == INVALID_FONT_HANDLE )
{
DPRINT( XorStr( "[Source::Startup] Can't create default font!" ) );
return false;
}
m_pAccuracy = std::make_shared< Feature::Accuracy >();
m_pAimbot = std::make_shared< Feature::Aimbot >();
m_pTriggerbot = std::make_shared< Feature::Triggerbot >();
m_pDataManager = std::make_shared< Feature::DataManager >();
m_pPlayerList = std::make_shared< Feature::PlayerList >();
m_pMenu = std::make_shared< Feature::Menu >();
m_pRender = std::make_shared< Feature::Render >();
if( !m_pMenu->Create( m_pTargetInput->GetTarget(), m_pDevice ) )
{
DPRINT( XorStr( "[Source::Startup] Can't create menu!" ) );
return false;
}
m_pClientSwap = std::make_shared< Memory::VmtSwap >();
m_pPredictionSwap = std::make_shared< Memory::VmtSwap >();
m_pInputSwap = std::make_shared< Memory::VmtSwap >();
m_pModelRenderSwap = std::make_shared< Memory::VmtSwap >();
m_pDeviceSwap = std::make_shared< Memory::VmtSwap >();
m_pPresentSwap = std::make_shared< Memory::Detour >();
m_pRunPredictionSwap = std::make_shared< Memory::Detour >();
if( !m_pClientSwap->Apply( m_pClient ) )
{
DPRINT( XorStr( "[Source::Startup] Can't apply 'client' vmt swap!" ) );
return false;
}
if( !m_pPredictionSwap->Apply( m_pPrediction ) )
{
DPRINT( XorStr( "[Source::Startup] Can't apply 'prediction' vmt swap!" ) );
return false;
}
if( !m_pInputSwap->Apply( m_pInput ) )
{
DPRINT( XorStr( "[Source::Startup] Can't apply 'input' vmt swap!" ) );
return false;
}
if( !m_pModelRenderSwap->Apply( m_pModelRender ) )
{
DPRINT( XorStr( "[Source::Startup] Can't apply 'model render' vmt swap!" ) );
return false;
}
if( !m_pDeviceSwap->Apply( m_pDevice ) )
{
DPRINT( XorStr( "[Source::Startup] Can't apply 'device' vmt swap!" ) );
return false;
}
auto CL_RunPrediction = Memory::PatternScan( XorStr( "engine.dll" ), XorStr( "A1 ?? ?? ?? ?? 39 05 ?? ?? ?? ?? 74 55" ) );
if( !m_pRunPredictionSwap->Apply( CL_RunPrediction, ( std::uintptr_t )Hooked_CL_RunPrediction, 5 ) )
{
DPRINT( XorStr( "[Source::Startup] Can't apply 'runprediction' code swap!" ) );
return false;
}
/*m_pClientSwap->Hook( &Hooked_CreateMove, IBaseClientDLL_CreateMove ); сосать пердеж*/
m_pClientSwap->Hook( &Hooked_FrameStageNotify, IBaseClientDLL_FrameStageNotify );
m_pPredictionSwap->Hook( &Hooked_RunCommand, IPrediction_RunCommand );
m_pPredictionSwap->Hook( &Hooked_FinishMove, IPrediction_FinishMove );
m_pPredictionSwap->Hook( &Hooked_Update, IPrediction_Update );
m_pInputSwap->Hook( &Hooked_GetUserCmd, IInput_GetUserCmd );
m_pInputSwap->Hook( &Hooked_ResetMouse, IInput_ResetMouse );
m_pModelRenderSwap->Hook( &Hooked_DrawModelEx, IVModelRender_DrawModelEx );
m_pDeviceSwap->Hook( &Hooked_Reset, IDirect3DDevice9_Reset );
m_pDeviceSwap->Hook(&Hooked_Present, IDirect3DDevice9_Present);
m_nTickBase = m_pNetVarManager->HookProp( XorStr( "DT_BasePlayer" ), XorStr( "m_nTickBase" ), DT_BasePlayer_m_nTickBase );
m_vecPunchAngle = m_pNetVarManager->HookProp( XorStr( "DT_BasePlayer" ), XorStr( "m_vecPunchAngle" ), DT_BasePlayer_m_vecPunchAngle );
m_flSpawnTime = m_pNetVarManager->HookProp( XorStr( "DT_ParticleSmokeGrenade" ), XorStr( "m_flSpawnTime" ), DT_ParticleSmokeGrenade_m_flSpawnTime );
m_angEyeAnglesX = m_pNetVarManager->HookProp( XorStr( "DT_CSPlayer" ), XorStr( "m_angEyeAngles[0]" ), DT_CSPlayer_m_angEyeAnglesX );
m_angEyeAnglesY = m_pNetVarManager->HookProp( XorStr( "DT_CSPlayer" ), XorStr( "m_angEyeAngles[1]" ), DT_CSPlayer_m_angEyeAnglesY );
return true;
}
если убираю пердеж не все читы работают че делать кто поможет шедро награжу
код
bool Startup()
{
m_pClient = ( IBaseClientDLL* )QueryInterface( XorStr( "client.dll" ), XorStr( "VClient" ) );
if( !m_pClient )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VClient' interface!" ) );
return false;
}
m_pEntList = ( IClientEntityList* )QueryInterface( XorStr( "client.dll" ), XorStr( "VClientEntityList" ) );
if( !m_pEntList )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VClientEntityList' interface!" ) );
return false;
}
m_pGameMovement = ( IGameMovement* )QueryInterface( XorStr( "client.dll" ), XorStr( "GameMovement" ) );
if( !m_pGameMovement )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'GameMovement' interface!" ) );
return false;
}
m_pPrediction = ( IPrediction* )QueryInterface( XorStr( "client.dll" ), XorStr( "VClientPrediction" ) );
if( !m_pPrediction )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VClientPrediction' interface!" ) );
return false;
}
m_pEngine = ( IVEngineClient* )QueryInterface( XorStr( "engine.dll" ), XorStr( "VEngineClient" ) );
if( !m_pEngine )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VEngineClient' interface!" ) );
return false;
}
m_pModelInfoClient = ( IVModelInfoClient* )QueryInterface( XorStr( "engine.dll" ), XorStr( "VModelInfoClient" ) );
if( !m_pModelInfoClient )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VModelInfoClient' interface!" ) );
return false;
}
m_pRenderView = ( IVRenderView* )QueryInterface( XorStr( "engine.dll" ), XorStr( "VEngineRenderView" ) );
if( !m_pRenderView )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VEngineRenderView' interface!" ) );
return false;
}
m_pModelRender = ( IVModelRender* )QueryInterface( XorStr( "engine.dll" ), XorStr( "VEngineModel" ) );
if( !m_pModelRender )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VEngineModel' interface!" ) );
return false;
}
m_pEngineTrace = ( IEngineTrace* )QueryInterface( XorStr( "engine.dll" ), XorStr( "EngineTraceClient" ) );
if( !m_pEngineTrace )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'EngineTraceClient' interface!" ) );
return false;
}
m_pCvar = ( ICvar* )QueryInterface( XorStr( "engine.dll" ), XorStr( "VEngineCvar003" ), true );
if( !m_pCvar )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VEngineCvar003' interface!" ) );
return false;
}
m_pPhysicsSurfaceProps = ( IPhysicsSurfaceProps* )QueryInterface( XorStr( "vphysics.dll" ), XorStr( "VPhysicsSurfaceProps" ) );
if( !m_pPhysicsSurfaceProps )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VPhysicsSurfaceProps' interface!" ) );
return false;
}
m_pMatSystem = ( IMaterialSystem* )QueryInterface( XorStr( "materialsystem.dll" ), XorStr( "VMaterialSystem" ) );
if( !m_pMatSystem )
{
DPRINT( XorStr( "[Source::Startup] Can't query 'VMaterialSystem' interface!" ) );
return false;
}
m_pGlobalVars = **( CGlobalVars*** )( Memory::PatternScan( XorStr( "client.dll" ), XorStr( "A3 ?? ?? ?? ?? E8 ?? ?? ?? ?? 8D 54 24 34" ) ) + 1 );
if( !m_pGlobalVars )
{
DPRINT( XorStr( "[Source::Startup] Can't find 'global vars'!" ) );
return false;
}
m_pInput = **( IInput*** )( Memory::PatternScan( XorStr( "client.dll" ), XorStr( "8B 0D ?? ?? ?? ?? 8B 11 50 8B 44 24 10" ) ) + 2 );
if( !m_pInput )
{
DPRINT( XorStr( "[Source::Startup] Can't find 'input'!" ) );
return false;
}
m_pDevice = Valve::Dx9Device()->m_pD3DDevice;
if( !m_pDevice )
{
DPRINT( XorStr( "[Source::Startup] Can't get 'device'!" ) );
return false;
}
m_pTargetInput = std::make_shared< Input::Win32 >();
if( !m_pTargetInput->Capture() )
{
DPRINT( XorStr( "[Source::Startup] Can't capture input!" ) );
return false;
}
m_pNetVarManager = std::make_shared< Source::NetVarManager >();
if( !m_pNetVarManager->Create( m_pClient ) )
{
DPRINT( XorStr( "[Source::Startup] Can't create netvar manager!" ) );
return false;
}
m_pRenderer = std::make_shared< Direct3D9::Renderer >();
if( !m_pRenderer->Create( m_pDevice ) )
{
DPRINT( XorStr( "[Source::Startup] Can't create renderer!" ) );
return false;
}
m_hFont = m_pRenderer->CreateFont( XorStr( "Tahoma" ), 8, FONT_CREATE_BOLD | FONT_CREATE_DROPSHADOW );
if( m_hFont == INVALID_FONT_HANDLE )
{
DPRINT( XorStr( "[Source::Startup] Can't create default font!" ) );
return false;
}
m_pAccuracy = std::make_shared< Feature::Accuracy >();
m_pAimbot = std::make_shared< Feature::Aimbot >();
m_pTriggerbot = std::make_shared< Feature::Triggerbot >();
m_pDataManager = std::make_shared< Feature::DataManager >();
m_pPlayerList = std::make_shared< Feature::PlayerList >();
m_pMenu = std::make_shared< Feature::Menu >();
m_pRender = std::make_shared< Feature::Render >();
if( !m_pMenu->Create( m_pTargetInput->GetTarget(), m_pDevice ) )
{
DPRINT( XorStr( "[Source::Startup] Can't create menu!" ) );
return false;
}
m_pClientSwap = std::make_shared< Memory::VmtSwap >();
m_pPredictionSwap = std::make_shared< Memory::VmtSwap >();
m_pInputSwap = std::make_shared< Memory::VmtSwap >();
m_pModelRenderSwap = std::make_shared< Memory::VmtSwap >();
m_pDeviceSwap = std::make_shared< Memory::VmtSwap >();
m_pPresentSwap = std::make_shared< Memory::Detour >();
m_pRunPredictionSwap = std::make_shared< Memory::Detour >();
if( !m_pClientSwap->Apply( m_pClient ) )
{
DPRINT( XorStr( "[Source::Startup] Can't apply 'client' vmt swap!" ) );
return false;
}
if( !m_pPredictionSwap->Apply( m_pPrediction ) )
{
DPRINT( XorStr( "[Source::Startup] Can't apply 'prediction' vmt swap!" ) );
return false;
}
if( !m_pInputSwap->Apply( m_pInput ) )
{
DPRINT( XorStr( "[Source::Startup] Can't apply 'input' vmt swap!" ) );
return false;
}
if( !m_pModelRenderSwap->Apply( m_pModelRender ) )
{
DPRINT( XorStr( "[Source::Startup] Can't apply 'model render' vmt swap!" ) );
return false;
}
if( !m_pDeviceSwap->Apply( m_pDevice ) )
{
DPRINT( XorStr( "[Source::Startup] Can't apply 'device' vmt swap!" ) );
return false;
}
auto CL_RunPrediction = Memory::PatternScan( XorStr( "engine.dll" ), XorStr( "A1 ?? ?? ?? ?? 39 05 ?? ?? ?? ?? 74 55" ) );
if( !m_pRunPredictionSwap->Apply( CL_RunPrediction, ( std::uintptr_t )Hooked_CL_RunPrediction, 5 ) )
{
DPRINT( XorStr( "[Source::Startup] Can't apply 'runprediction' code swap!" ) );
return false;
}
/*m_pClientSwap->Hook( &Hooked_CreateMove, IBaseClientDLL_CreateMove ); сосать пердеж*/
m_pClientSwap->Hook( &Hooked_FrameStageNotify, IBaseClientDLL_FrameStageNotify );
m_pPredictionSwap->Hook( &Hooked_RunCommand, IPrediction_RunCommand );
m_pPredictionSwap->Hook( &Hooked_FinishMove, IPrediction_FinishMove );
m_pPredictionSwap->Hook( &Hooked_Update, IPrediction_Update );
m_pInputSwap->Hook( &Hooked_GetUserCmd, IInput_GetUserCmd );
m_pInputSwap->Hook( &Hooked_ResetMouse, IInput_ResetMouse );
m_pModelRenderSwap->Hook( &Hooked_DrawModelEx, IVModelRender_DrawModelEx );
m_pDeviceSwap->Hook( &Hooked_Reset, IDirect3DDevice9_Reset );
m_pDeviceSwap->Hook(&Hooked_Present, IDirect3DDevice9_Present);
m_nTickBase = m_pNetVarManager->HookProp( XorStr( "DT_BasePlayer" ), XorStr( "m_nTickBase" ), DT_BasePlayer_m_nTickBase );
m_vecPunchAngle = m_pNetVarManager->HookProp( XorStr( "DT_BasePlayer" ), XorStr( "m_vecPunchAngle" ), DT_BasePlayer_m_vecPunchAngle );
m_flSpawnTime = m_pNetVarManager->HookProp( XorStr( "DT_ParticleSmokeGrenade" ), XorStr( "m_flSpawnTime" ), DT_ParticleSmokeGrenade_m_flSpawnTime );
m_angEyeAnglesX = m_pNetVarManager->HookProp( XorStr( "DT_CSPlayer" ), XorStr( "m_angEyeAngles[0]" ), DT_CSPlayer_m_angEyeAnglesX );
m_angEyeAnglesY = m_pNetVarManager->HookProp( XorStr( "DT_CSPlayer" ), XorStr( "m_angEyeAngles[1]" ), DT_CSPlayer_m_angEyeAnglesY );
return true;
}