Raised This Month: $ Target: $400
 0% 

radiusrange


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-16-2007 , 17:18   Re: radiusrange
Reply With Quote #7

eh... I did this:
PHP Code:
showplayers(id){
    new 
iplayer[32][2],count
    
    
for(i=1;i<=get_maxplayers();i++){
        if(!
is_user_connected(id))
            continue;
        if(!
is_user_alive(id))
            continue;
        
        
player[count][0] = i
        player
[count][1] = get_entity_distance(id,i)
        
count++
    }    
    
    
SortCustom2D(player,count,"stats_custom_compare")
    
    new 
message[480],pos,hasgonefar=0
    pos 
+= format(message[pos],480 pos,"Inside:^n")
    for(new 
i=0;i<=count-1;i++){
        new 
name[32]
        
get_user_name(player[count][0],name,32)
        
pos += format(message[pos],480 pos,"  %s^n"name)
        
        if(
player[count][1] > 1000 && hasgonefar == 0){
            
pos += format(message[pos],480 pos,"^nOutside:^n")
            
hasgonefar 1
        
}    
    }
    
set_hudmessage(255000.010.1506.012.00.00.03)
    
show_hudmessage(idmessage)
}

public 
stats_custom_compare(elem1[],elem2[])
{
    if(
elem1[1] > elem2[1]) return -1;
    else if(
elem1[1] < elem2[1]) return 1;
    return 
0;

__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
 



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 06:44.


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