Пользователь
-
Автор темы
- #1
Nemesis auto revolver.
C++:
void RageBot::AutoRevolver(CUserCmd* pCmd)
{
if (g_pConfigs.RagebotEnabled)
{
if (g_LocalPlayer && g_LocalPlayer->IsAlive())
{
CBaseCombatWeapon* pWeapon = g_LocalPlayer->m_hActiveWeapon().Get();
if (pWeapon && pWeapon->m_iItemDefinitionIndex() == WEAPON_REVOLVER)
{
g_pGlobals.RageBot.RevolverWorking = true;
pCmd->m_buttons &= ~IN_ATTACK2;
if (g_pGlobals.RageBot.RevolverWorking && pWeapon->CanFire())
{
if (g_pGlobalVars->curtime < g_pGlobals.RageBot.NextRevolverTime)
pCmd->m_buttons |= IN_ATTACK;
else
{
if (g_pGlobalVars->curtime < TICKS_TO_TIME(g_LocalPlayer->m_nTickBase()))
pCmd->m_buttons |= IN_ATTACK2;
else
g_pGlobals.RageBot.NextRevolverTime = g_pGlobalVars->curtime + 0.234375;
}
g_pGlobals.RageBot.RevolverWorking = g_pGlobalVars->curtime > g_pGlobals.RageBot.NextRevolverTime;
}
else
{
pCmd->m_buttons &= ~IN_ATTACK;
g_pGlobals.RageBot.NextRevolverTime = g_pGlobalVars->curtime + 0.234375;
g_pGlobals.RageBot.RevolverWorking = false;
}
}
}
}
}
C++:
bool __stdcall Hooks::hkCreateMove(float smt, CUserCmd* pCmd)
{
// createmove start
if (g_pClientState->m_iChokedCommands || g_pGlobals.Exploits.ShiftTicks >= 14)
{
CBaseCombatWeapon* weapon = g_LocalPlayer->m_hActiveWeapon().Get();
if (weapon && weapon->m_iItemDefinitionIndex() == WEAPON_REVOLVER)
{
if (g_pGlobals.RageBot.RevolverWorking)
weapon->m_flPostponeFireReadyTime() = g_pGlobals.RageBot.NextRevolverTime;
}
}
// features
}