Raised This Month: $ Target: $400
 0% 

Find player using find_ent_in_sphere


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-20-2013 , 17:28   Re: Find player using find_ent_in_sphere
Reply With Quote #5

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
        
}
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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