Raised This Month: $ Target: $400
 0% 

distance between 2 players


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-05-2012 , 21:45   Re: distance between 2 players
Reply With Quote #3

Quote:
Originally Posted by Xalus View Post
Try it ;)

PHP Code:
for(new 0find_sphere_class(ent"player"get_pcvar_float(cRadius), plListcharsmax(plList), plOrigin); i++) 
Wow.
You know that the condition is called after every loop iteration, so you are calling that function as many times as the number of entities it returns.
Very inefficient.

Call it once before the loop and store the return in a variable. Then use the variable in the condition.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 00:30.


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