https://www.youtube.com/watch?v=2ds2p3mJtXc
-
Автор темы
- #1
C++:
void Misc::edgejump(UserCmd* cmd) noexcept
{
if (!config->misc.edgejump || !GetAsyncKeyState(config->misc.edgejumpkey))
return;
if (!localPlayer || !localPlayer->isAlive())
return;
if (const auto mt = localPlayer->moveType(); mt == MoveType::LADDER || mt == MoveType::NOCLIP)
return;
static int longjump_tick = 0;
static bool ljbool = false;
if ((EnginePrediction::getFlags() & 1) && !(localPlayer->flags() & 1))
{
cmd->buttons |= UserCmd::IN_JUMP;
ljbool = true;
longjump_tick = memory->globalVars->tickCount + 2;
}
if (ljbool)
{
if (memory->globalVars->tickCount < longjump_tick) {
cmd->buttons |= UserCmd::IN_DUCK;
cmd->buttons &= ~UserCmd::IN_FORWARD;
cmd->buttons &= ~UserCmd::IN_BACK;
}
if (memory->globalVars->tickCount > longjump_tick)
ljbool = false;
}
}