Raised This Month: $ Target: $400
 0% 

Is on the ground.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ArthHa
Member
Join Date: Apr 2014
Old 10-20-2014 , 08:58   Is on the ground.
Reply With Quote #1

Hi,

There is any way to check where is the player? I mean, player on the ground or no. ;D
__________________


ArthHa is offline
Send a message via Skype™ to ArthHa
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 10-20-2014 , 08:59   Re: Is on the ground.
Reply With Quote #2

if (pev(id, pev_flags) & FL_ONGROUND) should work fine.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
ezio_auditore
Senior Member
Join Date: May 2013
Old 11-03-2014 , 12:34   Re: Is on the ground.
Reply With Quote #3

Quote:
Originally Posted by NiHiLaNTh View Post
if (pev(id, pev_flags) & FL_ONGROUND) should work fine.
Can it be used to check for other entities as well? Like a grenade, or a C4, or an AK47 etc ?
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
ArthHa
Member
Join Date: Apr 2014
Old 10-20-2014 , 10:26   Re: Is on the ground.
Reply With Quote #4

Thanks.
__________________


ArthHa is offline
Send a message via Skype™ to ArthHa
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-03-2014 , 12:51   Re: Is on the ground.
Reply With Quote #5

As long as they are ents what do you think ? A player is an entity...
__________________
HamletEagle is offline
ezio_auditore
Senior Member
Join Date: May 2013
Old 11-03-2014 , 14:17   Re: Is on the ground.
Reply With Quote #6

Ofcourse it is.
But a player entity is index from 1 thru 32.
And non-player entites begin after index 32
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-03-2014 , 15:05   Re: Is on the ground.
Reply With Quote #7

An index is just a way to identify the entity....
__________________
HamletEagle is offline
ezio_auditore
Senior Member
Join Date: May 2013
Old 11-03-2014 , 15:22   Re: Is on the ground.
Reply With Quote #8

okay, but i read somewhere that non-payer entities have indices something like 45.76 etc
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 11-03-2014 , 16:04   Re: Is on the ground.
Reply With Quote #9

45.76? They cant have decial indexes. I still dont get your question
Anyway, 0 - non-player entity (worldspawn), 1 - maxplayers - player entities; anything beyond - non player. And yes, non player entities can have those flags too. (like FL_ONGROUND and others).
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
ezio_auditore
Senior Member
Join Date: May 2013
Old 11-04-2014 , 01:19   Re: Is on the ground.
Reply With Quote #10

Quote:
Originally Posted by NiHiLaNTh View Post
45.76? They cant have decial indexes. I still dont get your question
Anyway, 0 - non-player entity (worldspawn), 1 - maxplayers - player entities; anything beyond - non player. And yes, non player entities can have those flags too. (like FL_ONGROUND and others).
Yes that was the exact thing i was looking for.
By the way, you make nice weapons man.
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
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:43.


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