AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   is user on air.. (https://forums.alliedmods.net/showthread.php?t=56516)

[X]-RayCat 06-15-2007 10:19

is user on air..
 
I need to detect if user is on air.. :o

Arkshine 06-15-2007 10:48

Re: is user on air..
 
Not sure :

Code:
    new flag;     flag = pev( id, pev_flags );         if( !( flag & FL_ONGROUND ) )     {         // [...]     }

Alka 06-15-2007 10:54

Re: is user on air..
 
@arkshine - Is correct.

Hum...but if player is in water is detected like be in air so you must add
Code:

...&& !(flags & FL_INWATER))
:wink:

kmal2t 06-15-2007 15:44

Re: is user on air..
 
I usually use what arkshine put but depending on what you're using you may need the alternative if( (pev(id, pev_flags) & IN_JUMP) ) to get right as they go in air just so you know the other method if you didn't already.

stupok 06-16-2007 00:54

Re: is user on air..
 
Quote:

Originally Posted by kmal2t (Post 490278)
if( (pev(id, pev_flags) & IN_JUMP) )

This is incorrect. You can check pev_button for IN_JUMP, not pev_flags.

kmal2t 06-17-2007 14:33

Re: is user on air..
 
errrrg I meant pev_button not flag :X


All times are GMT -4. The time now is 10:34.

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