Raised This Month: $ Target: $400
 0% 

Best way to detect if player is in air


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 06-20-2010 , 16:47   Best way to detect if player is in air
Reply With Quote #1

Which one of those is better (lower CPU usage)

1.
PHP Code:
new Float:velocity[3]
entity_get_vector(id,EV_VEC_velocity,velocity)

 if ( (
velocity[2]!=0) ) 
   
ColorChat(id ,GREEN"You are in air"
2.
PHP Code:
const FL_ONGROUND2 = ( FL_ONGROUND FL_PARTIALGROUND FL_INWATER |  FL_CONVEYOR FL_FLOAT );

if( !( 
pevidpev_flags ) & FL_ONGROUND2 
   
ColorChatidGREEN"You are in air"
1st uses engine modules
2nd uses amxmodx only, but it detects players on ladders as being in air
NucL3ra is offline
Send a message via Yahoo to NucL3ra
 



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 14:42.


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