Woah.. you have hooked CreateMove totally wrong m8.
And to make the player jump, use
Defines:
Code:
#define FL_ONGROUND (1<<0) // At rest / on the ground
#define FL_DUCKING (1<<1) // Player flag -- Player is fully crouched
#define FL_WATERJUMP (1<<3) // player jumping out of water
#define FL_ONTRAIN (1<<4) // Player is _controlling_ a train, so movement commands should be ignored on client during prediction.
#define FL_INRAIN (1<<5) // Indicates the entity is standing in rain
#define FL_FROZEN (1<<6) // Player is frozen for 3rd person camera
#define FL_ATCONTROLS (1<<7) // Player can't move, but keeps key inputs for controlling another entity
#define FL_CLIENT (1<<8) // Is a player
#define FL_FAKECLIENT (1<<9) // Fake client, simulated server side; don't send network messages to them
#define FL_INWATER (1<<10) // In water
Code:
if(GetAsyncKeyState(VK_SPACE) && !(pLocalEnitity->Flags() & FL_ONGROUND) {
cmd->buttons &= ~IN_JUMP
}
- - - Updated - - -
Originally Posted by
sethxi
Agh man I hate asking stupid questions... but
Code:
bool __stdcall CreateMove(float flInputSampleTime, CUserCmd *cmd) {
oCreateMove(flInputSampleTime, cmd);
/* BHOP */
CBaseEntity* pLocalPlayer = (CBaseEntity*)Interfaces->ClientEntList->GetClientEntity(Interfaces->Engine->GetLocalPlayer());
int groundflags[] = { 257, 259, 269, 233 };
if (GetAsyncKeyState(VK_SPACE))
{
for (int i = 0; i < 4; i++)
{
if (pLocalPlayer->GetFlags() == groundflags[i])
{
cmd->buttons |= IN_JUMP;
continue;
}
}
Msg("%s\n" "jump debug");
}
return true;
}
The problem is when you're holding space, the game is still holding +jump, so cmd->buttons |= IN_JUMP does nothing.
How do I get around this?
Also, you have forgot verifiedlist etc.
Contact me on skype and i will teach you how you can make one Working CreateMove hook.
Click on my skype icon Under my profile picture. <---------------- or add, bjorn_tssgaming