Hook when a player jumps. You could do it like so:
Code:
public fw_playerprethink(id) // FM_PlayerPreThink hook
{
if((pev(id,pev_button) & IN_JUMP) && !(pev(id,pev_oldbuttons) & IN_JUMP) && (pev(id,pev_flags) & FL_ONGROUND))
{
// PLAYER JUMPED
}
}
Make sure you hook FM_PlayerPreThink to that function (or, if using engine, make that function client_PreThink). It checks if they just pressed the jump button, and if they are on the ground. These are pretty much the conditions for a jump.
Then, you will want to grab their current velocity, change it's Z value (dimenson "2") to whatever you want (-1000?), and then set their velocity to that new value.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS