Raised This Month: $ Target: $400
 0% 

how to execute a function if player is in air?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 05-31-2020 , 11:31   Re: how to execute a function if player is in air?
Reply With Quote #1

check player flags, if there ain't FL_ONGROUND => player on air (or on ladder)
PHP Code:
if(!(pev(idpev_flags) & FL_ONGROUUND))
{
        
//Here

__________________
My plugin:
Celena Luna is offline
Grovliom
Member
Join Date: Mar 2020
Location: somewhere in Serbia
Old 05-31-2020 , 11:35   Re: how to execute a function if player is in air?
Reply With Quote #2

Quote:
Originally Posted by Celena Luna View Post
check player flags, if there ain't FL_ONGROUND => player on air (or on ladder)
PHP Code:
if(!(pev(idpev_flags) & FL_ONGROUUND))
{
        
//Here

i tried it in client_PreThink, but it just executes the function a lot of times.. what else can i use except client_prethink
Grovliom 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 17:11.


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