CS 1.6 Scripting Hacks and Programming

Click here to edit subtitle

Forums

Post Reply
Forum Home > HL1 Programming > [C++] Bhop

TreMBle^
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;

}

}

}

September 23, 2013 at 4:34 PM Flag Quote & Reply

You must login to post.