| Forum Home > HL1 Programming > [C++] Bhop | ||
|---|---|---|
|
Member Posts: 27 |
static bool: static bool bunnyhop = false;
cvar: cvar_t *bhop;
regcmd: cvar.bhop = g_Engine.pfnRegisterVariable("666xD_bhop","1",0);
cl createmove; int IN_SPACE = GetAsyncKeyState(VK_SPACE); if(cvar.bhop->value) { if(cmd->buttons&IN_JUMP) { if(bunnyhop && IN_SPACE) { cmd->buttons &= ~IN_JUMP; bunnyhop = false; } else { bunnyhop = true; } } } | |
| ||