Raised This Month: $ Target: $400
 0% 

[SOLVED] Compare distance between two players


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-03-2015 , 16:33   Re: Compare distance between two players
Reply With Quote #2

PHP Code:
new const Float:g_flScreamDistance 15.0
new iPlayers[32], Float:flOrigin[3], Float:flOrigin2[3], iPnumiPlayer

get_players
(iPlayersiPnum"ae""CT")
pev(idpev_originflOrigin)
            
for(new 
0iPnumi++)
{
    
iPlayer iPlayers[i]
    
pev(iPlayerpev_originflOrigin2)
                
    if(
get_distance_f(flOriginflOrigin2) <= g_flScreamDistance)
        
player_stealhealth(idiPlayer)

__________________

Last edited by Bugsy; 11-03-2015 at 16:36.
Bugsy 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 18:14.


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