Подведи собственные итоги года совместно с YOUGAME и забери ценные призы! Перейти

Не стреляет чит. Предикт.

  • Автор темы Автор темы ssaha112
  • Дата начала Дата начала
Начинающий
Начинающий
Статус
Оффлайн
Регистрация
27 Ноя 2017
Сообщения
206
Реакции
15
Всем привет. Почему, когда я пикаю вправо, то не срабатывает даблтап?Почему когда противник пикает меня, я стреляю будто бы с задержкой?
EnginePrediction есть.
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Дело в том что тут нужно показывать код, чтобы люди могли понять что не так у тебя работает.
 
EnginePrediction
C++:
Expand Collapse Copy
ClientFrameStage_t curStage;
void CEnginePrediction::PreStart()
{
    if (csgo->g_flVelMod < 1.f)
        *(bool*)((uintptr_t)interfaces.prediction + 0x24) = true;

    if (csgo->client_state->iDeltaTick > 0)
        interfaces.prediction->Update(csgo->client_state->iDeltaTick, true, csgo->client_state->nLastCommandAck, csgo->client_state->nLastOutgoingCommand + csgo->client_state->iChokedCommands);
}

void CEnginePrediction::UpdatePrediction() {
    //auto local_player = interfaces.ent_list->GetClientEntity(interfaces.engine->GetLocalPlayer());
    auto local_player = csgo->local;

    bool        valid{ csgo->client_state->iDeltaTick > 0 };

    if (m_stored_variables.m_flVelocityModifier < 1.0) {
        *reinterpret_cast<int*>(reinterpret_cast<uintptr_t>(interfaces.prediction + 0x24)) = 1;
    }

    // render start was not called.
    if (curStage == FRAME_NET_UPDATE_END) {

        int start = csgo->client_state->iDeltaTick;
        int stop = csgo->client_state->nLastOutgoingCommand + csgo->client_state->iChokedCommands;

        // call CPrediction::Update.
        interfaces.prediction->Update(csgo->client_state->iDeltaTick, valid, start, stop);
    }
}

void CEnginePrediction::Start(CUserCmd* cmd, IBasePlayer* local) {
    static CMoveData data{ };
    //auto local_player = interfaces.ent_list->GetClientEntity(interfaces.engine->GetLocalPlayer());
    auto local_player = csgo->local;

    interfaces.prediction->bInPrediction = true;

    // CPrediction::StartCommand
    local_player->SetCurrentCommand(cmd);

    //*interfaces.prediction->m_nPredictionRandomSeed = cmd->random_seed;
    //interfaces.prediction->m_pPredictionPlayer = local_player;

    // backup globals.
    m_stored_variables.m_flCurtime = interfaces.global_vars->curtime;
    m_stored_variables.m_flFrametime = interfaces.global_vars->frametime;

    // CPrediction::RunCommand

    // set globals appropriately.
    interfaces.global_vars->curtime = TICKS_TO_TIME(local_player->GetTickBase());
    interfaces.global_vars->frametime = interfaces.global_vars->interval_per_tick;

    // set target player ( host ).
    interfaces.move_helper->SetHost(local_player);
    interfaces.game_movement->StartTrackPredictionErrors(local_player);

    // setup input.
    interfaces.prediction->SetupMove(local_player, cmd, interfaces.move_helper, &data);

    // run movement.
    interfaces.game_movement->ProcessMovement(local_player, &data);
    interfaces.prediction->FinishMove(local_player, cmd, &data);
    interfaces.game_movement->FinishTrackPredictionErrors(local_player);

    // reset target player ( host ).
    interfaces.move_helper->SetHost(nullptr);
}

void CEnginePrediction::Finish(CUserCmd* cmd) {
    //auto local_player = interfaces.ent_list->GetClientEntity(interfaces.engine->GetLocalPlayer());
    auto local_player = csgo->local;
    if (!cmd || !local_player)
        return;

    interfaces.prediction->bInPrediction = false;

    //*interfaces.prediction->m_nPredictionRandomSeed = -1;
    //interfaces.prediction->m_pPredictionPlayer = nullptr;

    // restore globals.
    interfaces.global_vars->curtime = m_stored_variables.m_flCurtime;
    interfaces.global_vars->frametime = m_stored_variables.m_flFrametime;
}

void CEnginePrediction::CorrectViewmodelData() {
    auto local_player = csgo->local;
    if (!local_player->isAlive()) {
        return;
    }

    if (local_player->GetViewModel()) {
        IBasePlayer* const pViewModel = interfaces.ent_list->GetClientEntityFromHandle(local_player->GetViewModelPred());

        if (!pViewModel) {
            return;
        }

        pViewModel->GetAnimtime() = StoredViewmodel.m_flViewmodelAnimTime;
        pViewModel->GetCycle() = StoredViewmodel.m_flViewmodelCycle;
    }
}

void CEnginePrediction::UpdateViewmodelData() {
    auto local_player = csgo->local;
    if (!local_player->isAlive()) {
        return;
    }

    if (local_player->GetViewModel() ) {
        IBasePlayer* const pViewModel = interfaces.ent_list->GetClientEntityFromHandle(local_player->GetViewModelPred());

        if (!pViewModel) {
            return;
        }

        StoredViewmodel.m_flViewmodelCycle = pViewModel->GetCycle();
        StoredViewmodel.m_flViewmodelAnimTime = pViewModel->GetAnimtime();
    }
}

Doubletap
C++:
Expand Collapse Copy
void InitDoubleTap()
{
    int tick = (vars.ragebot.dt_shift_ticks % 2) ? vars.ragebot.dt_shift_ticks + 1 : vars.ragebot.dt_shift_ticks;
    static bool did_shift_before = false;
    static int double_tapped = 0;
    static int prev_shift_ticks = 0;
    static bool reset = false;
    static int shot_tick = 0;
    static int process_ticks = 0;
    static int limit = 14;
    CMAntiAim::Get().shot_dt = false;
    if (CanDT() && !csgo->game_rules->IsFreezeTime())
    {
        if (vars.ragebot.double_tap->active)
        {
            prev_shift_ticks = 0;

            auto can_shift_shot = CMAntiAim::Get().can_exploit(tick);//16
            auto can_shot = CMAntiAim::Get().can_exploit(abs(-1 - prev_shift_ticks));

            if (can_shift_shot || !can_shot && !did_shift_before)
            {
                prev_shift_ticks = tick;//16
                double_tapped = 0;
            }
            else {
                double_tapped++;
                prev_shift_ticks = 0;
            }

            //if (csgo->send_packet)
            {
                if (prev_shift_ticks > 0)
                {
                    if (CMAntiAim::Get().can_exploit(prev_shift_ticks))
                    {
                        CMAntiAim::Get().shot_dt = true;
                        if (csgo->cmd->buttons & IN_ATTACK)
                        {
                            csgo->m_nTickbaseShift = prev_shift_ticks;
                            CMAntiAim::Get().did_shot = true;
                            reset = false;
                            CMAntiAim::Get().cmd_tick = csgo->cmd->command_number;
                            CMAntiAim::Get().base_tick = csgo->local->GetTickBase();
                        }
                        else
                        {
                            if ((!(csgo->cmd->buttons & IN_ATTACK) || !Ragebot::Get().shot) && CMAntiAim::Get().did_shot) {
                                csgo->dt_charged = false;
                                csgo->skip_ticks = vars.ragebot.dt_instant ? tick : tick/2;//16 8
                                CMAntiAim::Get().did_shot = false;
                            }
                        }
                    }
                    else
                    {
                        CMAntiAim::Get().shot_dt = false;
                        process_ticks = 0;
                    }
                }
                did_shift_before = prev_shift_ticks != 0;
            }
        }
        else {
            csgo->bShootedFirstBullet = false;
            csgo->TickShifted = false;
            csgo->nSinceUse = 0;
        }
    }
}
 
EnginePrediction
C++:
Expand Collapse Copy
ClientFrameStage_t curStage;
void CEnginePrediction::PreStart()
{
    if (csgo->g_flVelMod < 1.f)
        *(bool*)((uintptr_t)interfaces.prediction + 0x24) = true;

    if (csgo->client_state->iDeltaTick > 0)
        interfaces.prediction->Update(csgo->client_state->iDeltaTick, true, csgo->client_state->nLastCommandAck, csgo->client_state->nLastOutgoingCommand + csgo->client_state->iChokedCommands);
}

void CEnginePrediction::UpdatePrediction() {
    //auto local_player = interfaces.ent_list->GetClientEntity(interfaces.engine->GetLocalPlayer());
    auto local_player = csgo->local;

    bool        valid{ csgo->client_state->iDeltaTick > 0 };

    if (m_stored_variables.m_flVelocityModifier < 1.0) {
        *reinterpret_cast<int*>(reinterpret_cast<uintptr_t>(interfaces.prediction + 0x24)) = 1;
    }

    // render start was not called.
    if (curStage == FRAME_NET_UPDATE_END) {

        int start = csgo->client_state->iDeltaTick;
        int stop = csgo->client_state->nLastOutgoingCommand + csgo->client_state->iChokedCommands;

        // call CPrediction::Update.
        interfaces.prediction->Update(csgo->client_state->iDeltaTick, valid, start, stop);
    }
}

void CEnginePrediction::Start(CUserCmd* cmd, IBasePlayer* local) {
    static CMoveData data{ };
    //auto local_player = interfaces.ent_list->GetClientEntity(interfaces.engine->GetLocalPlayer());
    auto local_player = csgo->local;

    interfaces.prediction->bInPrediction = true;

    // CPrediction::StartCommand
    local_player->SetCurrentCommand(cmd);

    //*interfaces.prediction->m_nPredictionRandomSeed = cmd->random_seed;
    //interfaces.prediction->m_pPredictionPlayer = local_player;

    // backup globals.
    m_stored_variables.m_flCurtime = interfaces.global_vars->curtime;
    m_stored_variables.m_flFrametime = interfaces.global_vars->frametime;

    // CPrediction::RunCommand

    // set globals appropriately.
    interfaces.global_vars->curtime = TICKS_TO_TIME(local_player->GetTickBase());
    interfaces.global_vars->frametime = interfaces.global_vars->interval_per_tick;

    // set target player ( host ).
    interfaces.move_helper->SetHost(local_player);
    interfaces.game_movement->StartTrackPredictionErrors(local_player);

    // setup input.
    interfaces.prediction->SetupMove(local_player, cmd, interfaces.move_helper, &data);

    // run movement.
    interfaces.game_movement->ProcessMovement(local_player, &data);
    interfaces.prediction->FinishMove(local_player, cmd, &data);
    interfaces.game_movement->FinishTrackPredictionErrors(local_player);

    // reset target player ( host ).
    interfaces.move_helper->SetHost(nullptr);
}

void CEnginePrediction::Finish(CUserCmd* cmd) {
    //auto local_player = interfaces.ent_list->GetClientEntity(interfaces.engine->GetLocalPlayer());
    auto local_player = csgo->local;
    if (!cmd || !local_player)
        return;

    interfaces.prediction->bInPrediction = false;

    //*interfaces.prediction->m_nPredictionRandomSeed = -1;
    //interfaces.prediction->m_pPredictionPlayer = nullptr;

    // restore globals.
    interfaces.global_vars->curtime = m_stored_variables.m_flCurtime;
    interfaces.global_vars->frametime = m_stored_variables.m_flFrametime;
}

void CEnginePrediction::CorrectViewmodelData() {
    auto local_player = csgo->local;
    if (!local_player->isAlive()) {
        return;
    }

    if (local_player->GetViewModel()) {
        IBasePlayer* const pViewModel = interfaces.ent_list->GetClientEntityFromHandle(local_player->GetViewModelPred());

        if (!pViewModel) {
            return;
        }

        pViewModel->GetAnimtime() = StoredViewmodel.m_flViewmodelAnimTime;
        pViewModel->GetCycle() = StoredViewmodel.m_flViewmodelCycle;
    }
}

void CEnginePrediction::UpdateViewmodelData() {
    auto local_player = csgo->local;
    if (!local_player->isAlive()) {
        return;
    }

    if (local_player->GetViewModel() ) {
        IBasePlayer* const pViewModel = interfaces.ent_list->GetClientEntityFromHandle(local_player->GetViewModelPred());

        if (!pViewModel) {
            return;
        }

        StoredViewmodel.m_flViewmodelCycle = pViewModel->GetCycle();
        StoredViewmodel.m_flViewmodelAnimTime = pViewModel->GetAnimtime();
    }
}

Doubletap
C++:
Expand Collapse Copy
void InitDoubleTap()
{
    int tick = (vars.ragebot.dt_shift_ticks % 2) ? vars.ragebot.dt_shift_ticks + 1 : vars.ragebot.dt_shift_ticks;
    static bool did_shift_before = false;
    static int double_tapped = 0;
    static int prev_shift_ticks = 0;
    static bool reset = false;
    static int shot_tick = 0;
    static int process_ticks = 0;
    static int limit = 14;
    CMAntiAim::Get().shot_dt = false;
    if (CanDT() && !csgo->game_rules->IsFreezeTime())
    {
        if (vars.ragebot.double_tap->active)
        {
            prev_shift_ticks = 0;

            auto can_shift_shot = CMAntiAim::Get().can_exploit(tick);//16
            auto can_shot = CMAntiAim::Get().can_exploit(abs(-1 - prev_shift_ticks));

            if (can_shift_shot || !can_shot && !did_shift_before)
            {
                prev_shift_ticks = tick;//16
                double_tapped = 0;
            }
            else {
                double_tapped++;
                prev_shift_ticks = 0;
            }

            //if (csgo->send_packet)
            {
                if (prev_shift_ticks > 0)
                {
                    if (CMAntiAim::Get().can_exploit(prev_shift_ticks))
                    {
                        CMAntiAim::Get().shot_dt = true;
                        if (csgo->cmd->buttons & IN_ATTACK)
                        {
                            csgo->m_nTickbaseShift = prev_shift_ticks;
                            CMAntiAim::Get().did_shot = true;
                            reset = false;
                            CMAntiAim::Get().cmd_tick = csgo->cmd->command_number;
                            CMAntiAim::Get().base_tick = csgo->local->GetTickBase();
                        }
                        else
                        {
                            if ((!(csgo->cmd->buttons & IN_ATTACK) || !Ragebot::Get().shot) && CMAntiAim::Get().did_shot) {
                                csgo->dt_charged = false;
                                csgo->skip_ticks = vars.ragebot.dt_instant ? tick : tick/2;//16 8
                                CMAntiAim::Get().did_shot = false;
                            }
                        }
                    }
                    else
                    {
                        CMAntiAim::Get().shot_dt = false;
                        process_ticks = 0;
                    }
                }
                did_shift_before = prev_shift_ticks != 0;
            }
        }
        else {
            csgo->bShootedFirstBullet = false;
            csgo->TickShifted = false;
            csgo->nSinceUse = 0;
        }
    }
}
give a engineprediction.h
 
Последнее редактирование:
Назад
Сверху Снизу