Raised This Month: $ Target: $400
 0% 

Find player using find_ent_in_sphere


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-23-2013 , 19:35   Re: Find player using find_ent_in_sphere
Reply With Quote #7

Quote:
Originally Posted by ConnorMcLeod View Post
Use find_sphere_class is far more efficient.
It's like using get_players instead of looping all possible players.

PHP Code:
HurtPlayersInUserSphere(idFloat:radiusdamageetc...)
{
    new 
players[32], playernum find_sphere_class(id"player"radiusplayerssizeof(players));
    for(--
numnum>=0num--)
    {
        
player players[num];
        if( 
player != id )
        {
            
// hurt player
        
}
    }

find_sphere_class is still looping all players and checking their origins right?
.Dare Devil. 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 16:19.


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