Raised This Month: $ Target: $400
 0% 

Finding Players near Player


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 04-01-2011 , 22:54   Re: Finding Players near Player
Reply With Quote #2

Well you could try something like this, where check() is simply your function which is called everytime your going to check for players, whether it be in PreThink or a task you set every second or so:

PHP Code:
public checkid )
{
    new 
num, list[ 32 ], Float:dist 1000.0;
    
num find_sphere_classid"player"dist, list, 32 );
    
    new 
player;
    for ( new 
num i++ )
    {        
        
player = list[ ];
        if( !
is_user_aliveplayer ) || get_user_teamplayer ) != get_user_teamid ) )
            continue;
            
        
//unfreeze player
    
}

EDIT: Can only players only unfreeze a team mate?

Last edited by hornet; 04-02-2011 at 12:16.
hornet 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 14:33.


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