Raised This Month: $ Target: $400
 0% 

Prethink velocity


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-29-2008 , 20:11   Re: Prethink velocity
Reply With Quote #4

Code:
#include <amxmodx> #include <fakemeta> new bool:g_up[33]; public plugin_init() {     register_plugin("PreThink Velocity Test", "0.1", "Exolent");         register_forward(FM_PlayerPreThink, "FwdPlayerPreThink"); } public client_connect(client) {     g_up[client] = false; } public FwdPlayerPreThink(client) {     if( !is_user_alive(client) ) return;         new Float:velocity[3];     pev(client, pev_velocity, velocity);         if( velocity[2] <= 0.0 && g_up[client] )     {         // client just now starts to fall after rising         g_up[client] = false;     }     else if( velocity[2] > 0.0 && !g_up[client] )     {         // client just now starts to rise         g_up[client] = true;                 if( pev(client, pev_flags) & FL_ONGROUND )         {             client_print(client, print_chat, "You are moving up while on the ground");         }         else         {             client_print(client, print_chat, "You are moving up and not on the ground");         }     } }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
 



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 03:13.


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