Raised This Month: $ Target: $400
 0% 

Speed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vechta
Veteran Member
Join Date: Jun 2010
Old 07-16-2010 , 07:58   Speed
Reply With Quote #1

How to get if speed is higher then ex. 200 ?
Vechta is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 07-16-2010 , 08:08   Re: Speed
Reply With Quote #2

Actual player speed or maxspeed?
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Ryokin
Senior Member
Join Date: Jan 2010
Old 07-16-2010 , 08:09   Re: Speed
Reply With Quote #3

Quote:
Originally Posted by Vechta View Post
How to get if speed is higher then ex. 200 ?
PHP Code:
    static Float:velocity[3], Float:speed
    pev
(idpev_velocityvelocity)
    
speed vector_length(velocity)
    if ( 
speed 200)
//    ... 
for current speed
__________________
NH4CL + NaOH -> NH3 + H2O + NaCL
Ryokin is offline
Vechta
Veteran Member
Join Date: Jun 2010
Old 07-16-2010 , 08:10   Re: Speed
Reply With Quote #4

maxspeed

@Rykoin: Thank you, post at the same second xD
Vechta is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 07-16-2010 , 08:40   Re: Speed
Reply With Quote #5

Ryokin's post is for current speed, for maxspeed you must use pev_maxspeed.
Seta00 is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 07-16-2010 , 09:17   Re: Speed
Reply With Quote #6

PHP Code:
//curr speed
new Float:fSpeed;
pev(idpev_speedfSpeed);
//maxspeed
new Float:fMaxspeed;
pev(idpev_maxspeedfMaxspeed); 
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Vechta
Veteran Member
Join Date: Jun 2010
Old 07-16-2010 , 09:21   Re: Speed
Reply With Quote #7

Quote:
Originally Posted by Alka View Post
PHP Code:
//curr speed
new Float:fSpeed;
pev(idpev_speedfSpeed);
//maxspeed
new Float:fMaxspeed;
pev(idpev_maxspeedfMaxspeed); 
If im jumping very fast it also maxspeed or only if im on ground ?
Vechta is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-16-2010 , 09:22   Re: Speed
Reply With Quote #8

PHP Code:
//curr speed
new Float:fSpeed;
pev(idpev_speedfSpeed); 
Alka... No.
__________________
Arkshine is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 07-16-2010 , 09:24   Re: Speed
Reply With Quote #9

Quote:
Originally Posted by Vechta View Post
If im jumping very fast it also maxspeed or only if im on ground ?
Maxspeed it's the maximum value for speed that a player can have based on weapon or other events. If you want to get the player speed anytime when he moves / jumps / walks just use pev_speed, or Ryokins method.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-16-2010 , 09:26   Re: Speed
Reply With Quote #10

pev_speed will return always 0.
__________________
Arkshine 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 07:07.


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