Raised This Month: $51 Target: $400
 12% 

loop through entities


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rirre
Veteran Member
Join Date: Nov 2006
Old 01-27-2015 , 16:32   loop through entities
Reply With Quote #1

This is supposed to check through entities with same owner if they're alive and on the ground for the owner to do next action.
So, if one or more of them is not on the ground yet, the owner have to wait/keep thinking until they are.
I just don't know how to always find the entity/entities which has not reached the ground yet.
Spoiler

EDIT: Solved by creating them via EHANDLE instead.

Last edited by Rirre; 01-31-2015 at 19:31.
Rirre is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 02-19-2015 , 01:50   Re: loop through entities
Reply With Quote #2

PHP Code:
edict_t pEntity NULL;
for (
int entityId gpGlobals->maxClients 1entityId <= gpGlobals->maxEntitiesentityId++)
{
   
pEntity INDEXENT(entityId);

   if (!
FNullEnt(pEntity) && pEntity->v.owner == g_pMyOwner && pEntity->v.flags&FL_ONGROUND){}

Something like that?
__________________

Last edited by claudiuhks; 02-19-2015 at 01:50.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Rirre
Veteran Member
Join Date: Nov 2006
Old 03-07-2015 , 18:39   Re: loop through entities
Reply With Quote #3

Already solved, thank you anyway for your effort
Rirre 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 21:32.


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