Raised This Month: $ Target: $400
 0% 

changing user velocity


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
bwgrubbs1
Senior Member
Join Date: Sep 2006
Old 06-22-2007 , 14:13   changing user velocity
Reply With Quote #1

I am looking to change a users velocity if he touches a certain entity and it will boost him forward.

__-```-__
this is normal jump

__---````````````---__
this is boost jump after touch entity

Get the idea ?

I have this already maybe im stupid on my code.

Code:
public plugin_init() {     (...)     register_forward(FM_Touch, "fwdTouch", 0);     register_forward(FM_PlayerPreThink, "client_PreThink");     (...) } public client_PreThink(id) {     if(!is_user_alive(id))         return PLUGIN_CONTINUE;     new flags = pev(id, pev_flags);     if(hasboost[id])     {         if(flags & FL_ONGROUND)         {             set_pev(id,pev_velocity,{0.0, 0.0, 0.0});             hasboost[id] = false;             return PLUGIN_CONTINUE;         }     }     return PLUGIN_CONTINUE; } public fwdTouch(ent, id) {     (...)     new Float:velocity[] = {0.0, 128.0, 0.0};     (...)     else if(equali(szClassname, "booster"))     {         set_pev(id,pev_velocity,velocity);         hasboost[id] = true;         return PLUGIN_HANDLED_MAIN;     }     return PLUGIN_HANDLED_MAIN; }
bwgrubbs1 is offline
 


Thread Tools
Display Modes

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 21:33.


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