mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
Plot / door management userlist sorting (#1747)
* Plot / door management userlist sorting This correctly sorts the nearby humans list in both mods, I have this running on my 1051 server with no issues, @ebaydayz please advise if this is not right, I've tested it pretty well and it is indeed selecting the right person/UID * Door/plot management fixes As per @ebaydayz
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
private ["_closePeople","_friendUID","_friendName"];
|
||||
private ["_closePeople","_friendUID","_friendName","_userList"];
|
||||
disableSerialization;
|
||||
|
||||
_userList = (findDisplay 711194) displayCtrl 7001;
|
||||
|
||||
lbClear _userList;
|
||||
|
||||
_closePeople = if (DZE_plotManagementMustBeClose) then { player nearEntities ["CAManBase", 10] } else { playableUnits };
|
||||
|
||||
lbClear 7001;
|
||||
if (!DZE_plotManagementMustBeClose) then {_closePeople = playableUnits;} else {_closePeople = player nearEntities ["CAManBase", 10];};
|
||||
Humans = [];
|
||||
{
|
||||
if (isPlayer _x) then {
|
||||
_friendUID = [_x] call FNC_GetPlayerUID;
|
||||
_friendName = name _x;
|
||||
Humans = Humans + [[_friendUID,toArray _friendName]];
|
||||
lbAdd [7001, _friendName];
|
||||
_userList lbAdd _friendName;
|
||||
_userList lbSetData [(lbSize _userList) -1,_friendUID];
|
||||
};
|
||||
} forEach _closePeople;
|
||||
} forEach _closePeople;
|
||||
|
||||
lbSort _userList;
|
||||
|
||||
Reference in New Issue
Block a user