AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Is on the ground. (https://forums.alliedmods.net/showthread.php?t=250226)

ArthHa 10-20-2014 08:58

Is on the ground.
 
Hi,

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

NiHiLaNTh 10-20-2014 08:59

Re: Is on the ground.
 
if (pev(id, pev_flags) & FL_ONGROUND) should work fine.

ArthHa 10-20-2014 10:26

Re: Is on the ground.
 
Thanks. :)

ezio_auditore 11-03-2014 12:34

Re: Is on the ground.
 
Quote:

Originally Posted by NiHiLaNTh (Post 2213492)
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 ? :shock:

HamletEagle 11-03-2014 12:51

Re: Is on the ground.
 
As long as they are ents what do you think ? A player is an entity...

ezio_auditore 11-03-2014 14:17

Re: Is on the ground.
 
Ofcourse it is.
But a player entity is index from 1 thru 32.
And non-player entites begin after index 32

HamletEagle 11-03-2014 15:05

Re: Is on the ground.
 
An index is just a way to identify the entity....

ezio_auditore 11-03-2014 15:22

Re: Is on the ground.
 
okay, but i read somewhere that non-payer entities have indices something like 45.76 etc

NiHiLaNTh 11-03-2014 16:04

Re: Is on the ground.
 
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).

ezio_auditore 11-04-2014 01:19

Re: Is on the ground.
 
Quote:

Originally Posted by NiHiLaNTh (Post 2219770)
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. :) :wink:


All times are GMT -4. The time now is 17:43.

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