2023-09-23 14:05:31 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
GMS_fnc_findNearestInfantryGroup
|
|
|
|
|
|
|
|
by Ghostrider
|
|
|
|
|
|
|
|
--------------------------
|
|
|
|
License
|
|
|
|
--------------------------
|
|
|
|
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
|
|
|
|
|
|
|
|
http://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
|
|
*/
|
2023-11-01 01:57:49 +00:00
|
|
|
#include "\x\addons\GMS\Compiles\Init\GMS_defines.hpp"
|
2023-09-23 14:05:31 +00:00
|
|
|
params["_pos"];
|
|
|
|
private["_units"];
|
|
|
|
|
|
|
|
if (GMSCore_modtype isEqualTo "Epoch") then {_units = (nearestObjects[_pos,["I_Soldier_EPOCH"], 1000]) select {vehicle _x isEqualTo _x}};
|
|
|
|
if !(toLowerANSI(GMSCore_modtype) isEqualTo "epoch") then {_units = (nearestObjects[_pos ,["i_g_soldier_unarmed_f"], 1000]) select {vehicle _x isEqualTo _x}};
|
|
|
|
private _nearestGroup = group(_units select 0);
|
|
|
|
_nearestGroup
|