Raised This Month: $ Target: $400
 0% 

Find players near given origin?>


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-18-2013 , 09:51   Re: Find players near given origin?>
Reply With Quote #1

Well, there is several ways.

- Using one native :

new playersList[32];
new playersCount = find_sphere_class( 0, "player", RADIUS, playersList, sizeof playersList, ORIGIN );

- Possible to loop with find_ent_in_sphere() and counting.
-There is also looping among all players and checking each origin distance.

The first is probably the most efficient.
__________________

Last edited by Arkshine; 08-18-2013 at 09:51.
Arkshine is offline
Reply



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 15:54.


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