Files
DayZ-Epoch/SQF/dayz_code/actions/doorManagement/doorNearbyHumans.sqf
oiad b06d3d4623 Sync near player checks
Checking if the player is the closest is not always the best idea, this
fixes a few dupes and syncs the distance for all player checks
2020-06-13 11:26:44 +12:00

20 lines
498 B
Plaintext

private ["_closePeople","_friendUID","_friendName","_userList"];
disableSerialization;
_userList = (findDisplay 711195) displayCtrl 7101;
lbClear _userList;
_closePeople = if (DZE_doorManagementMustBeClose) then {player nearEntities ["CAManBase", 12]} else {playableUnits};
{
if (isPlayer _x) then {
_friendUID = getPlayerUID _x;
_friendName = name _x;
_userList lbAdd _friendName;
_userList lbSetData [(lbSize _userList) -1,_friendUID];
};
} forEach _closePeople;
lbSort _userList;