Raised This Month: $ Target: $400
 0% 

Quick Jump


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 12-30-2006 , 15:04   Re: Quick Jump
Reply With Quote #1

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
XxAvalanchexX is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode