Raised This Month: $ Target: $400
 0% 

how to know what speed the player is moving


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-21-2007 , 10:09   Re: how to know what speed the player is moving
Reply With Quote #3

uh...
just a few changes:
PHP Code:
#include <amxmodx>
#include <fakemeta>

public plugin_init()
{
    
register_forward(FM_PlayerPreThink"fm_playerthink"1)
}

public 
fm_playerthink(id)
{
    if(!
is_user_alive(id)) return FMRES_IGNORED
    
new Float:speed get_currentspeed(id)
    
    
//what ever
    
\
    return 
FMRES_IGNORED
}


// stock for getting the current player speed
stock Float:get_currentspeed(id
{
    static 
Float:vel[3]
    
pev(id,pev_velocityvel)
    return 
vector_length(vel)

__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
 



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 06:44.


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