mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
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
20 lines
498 B
Plaintext
20 lines
498 B
Plaintext
private ["_closePeople","_friendUID","_friendName","_userList"];
|
|
disableSerialization;
|
|
|
|
_userList = (findDisplay 711194) displayCtrl 7001;
|
|
|
|
lbClear _userList;
|
|
|
|
_closePeople = if (DZE_plotManagementMustBeClose) 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;
|