Raised This Month: $ Target: $400
 0% 

find_ent_in_sphere , finding opposite team players index?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Kotoamatsukami
Member
Join Date: Jan 2017
Location: Malaysia
Old 03-03-2017 , 13:00   find_ent_in_sphere , finding opposite team players index?
Reply With Quote #1

Hello... I am sorry for making thread, again.

As the title stated, by the way, I know how the native works. My main problem emerges when finding the entities( specifically players ) index. So, I tried.
PHP Code:
public Randomid )
{
    new 
Float:CurOrigin], EnemyEnt = -1
    
    pev
idpev_originCurOrigin )
    
    
EnemyEnt find_ent_in_sphereEnemyEntCurOrigin300.0 )
    
    while( 
EnemyEnt != )
    {
        
// do stuff...
    
}

AFAIK, this will only retrieve a single entity( player ) index, right? Do I need to use 'for' loop instead of 'while' to catch the indexes using get_maxplayers( )? If so, then how?
My main goal is to retrieve all entities( players ) index inside the radius...

Thank you for your time...
Kotoamatsukami is offline
 



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 20:59.


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