2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-02-02 22:28:27 +00:00
|
|
|
* Author: bux578
|
|
|
|
* Returns an array of alive players in a given radius around a given location
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Center position <POSTION>
|
|
|
|
* 1: Radius <NUMBER>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Player units <ARRAY<OBJECT>>
|
|
|
|
*
|
|
|
|
* Example:
|
2015-08-07 07:18:42 +00:00
|
|
|
* [[300,300,0], 100] call ace_switchunits_fnc_nearestPlayers
|
2015-02-02 22:28:27 +00:00
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
2015-01-12 14:47:22 +00:00
|
|
|
|
2015-08-07 07:18:42 +00:00
|
|
|
params ["_position", "_radius"];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2018-10-10 01:21:46 +00:00
|
|
|
(nearestObjects [_position, ["Man"], _radius]) select {alive _x && {[_x] call EFUNC(common,isPlayer)}};
|