C++ Fake Flick for lw.

Пользователь
Пользователь
Статус
Оффлайн
Регистрация
20 Мар 2020
Сообщения
166
Реакции
41
Из бекмува.

Код:
Expand Collapse Copy
 void antiaim::fakeflick(CUserCmd*  m_pcmd)
{
    if (m_pcmd->m_buttons & IN_ATTACK || m_pcmd->m_buttons & IN_ATTACK2 || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_FLASHBANG || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_HEGRENADE || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_SMOKEGRENADE || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_MOLOTOV || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_DECOY || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_INCGRENADE)
        return;

    if (!g_cfg.antiaim.flick)
        return;

   
    if (!g_ctx.local()->is_alive())
        return;
    static bool flicker;
    if (m_globals()->m_tickcount % g_cfg.antiaim.flicktick - 1 == 0)
        g_ctx.globals.tickbase_shift++;

    if (m_globals()->m_tickcount % g_cfg.antiaim.flicktick == 0) {
        flicker = true;
        int angle = flip == true ? -90 : 90;
        m_pcmd->m_viewangles.y = m_pcmd->m_viewangles.y + angle;
    }
    else {
        flicker = false;
    }
}
 
if (m_pcmd->m_buttons & IN_ATTACK || m_pcmd->m_buttons & IN_ATTACK2 || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_FLASHBANG || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_HEGRENADE || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_SMOKEGRENADE || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_MOLOTOV || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_DECOY || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_INCGRENADE)


Best sanity check :roflanzdarova:
 
if (m_pcmd->m_buttons & IN_ATTACK || m_pcmd->m_buttons & IN_ATTACK2 || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_FLASHBANG || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_HEGRENADE || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_SMOKEGRENADE || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_MOLOTOV || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_DECOY || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_INCGRENADE)
Тебя совесть не мучает?
 
if (m_pcmd->m_buttons & IN_ATTACK || m_pcmd->m_buttons & IN_ATTACK2 || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_FLASHBANG || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_HEGRENADE || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_SMOKEGRENADE || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_MOLOTOV || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_DECOY || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_INCGRENADE)


Best sanity check :roflanzdarova:
За бесплатно ты большего не получишь
 
if (m_pcmd->m_buttons & IN_ATTACK || m_pcmd->m_buttons & IN_ATTACK2 || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_FLASHBANG || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_HEGRENADE || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_SMOKEGRENADE || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_MOLOTOV || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_DECOY || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_INCGRENADE)


Best sanity check :roflanzdarova:
слово " Из бекмува. " не смущает?
 
Can you define var flip and how many flick ticks should I use ?
 
Последнее редактирование:
what is the flick variable value supposed to be ?
 
Из бекмува.

Код:
Expand Collapse Copy
 void antiaim::fakeflick(CUserCmd*  m_pcmd)
{
    if (m_pcmd->m_buttons & IN_ATTACK || m_pcmd->m_buttons & IN_ATTACK2 || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_FLASHBANG || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_HEGRENADE || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_SMOKEGRENADE || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_MOLOTOV || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_DECOY || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_INCGRENADE)
        return;

    if (!g_cfg.antiaim.flick)
        return;

  
    if (!g_ctx.local()->is_alive())
        return;
    static bool flicker;
    if (m_globals()->m_tickcount % g_cfg.antiaim.flicktick - 1 == 0)
        g_ctx.globals.tickbase_shift++;

    if (m_globals()->m_tickcount % g_cfg.antiaim.flicktick == 0) {
        flicker = true;
        int angle = flip == true ? -90 : 90;
        m_pcmd->m_viewangles.y = m_pcmd->m_viewangles.y + angle;
    }
    else {
        flicker = false;
    }
}
instead of going through every single grenade just do g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPONTYPE_GRENADE
 
if (m_pcmd->m_buttons & IN_ATTACK || m_pcmd->m_buttons & IN_ATTACK2 || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_FLASHBANG || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_HEGRENADE || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_SMOKEGRENADE || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_MOLOTOV || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_DECOY || g_ctx.globals.weapon->m_iItemDefinitionIndex() == WEAPON_INCGRENADE) return;
is_grenade для тебя какая-то шутка?
 
What is the best unhitable g_cfg.antiaim.flicktick ?
 
Назад
Сверху Снизу