I wrote a fix for it.
You can simply backup and replace the this function in line ~288
private void CargoHUD(string reason)
Edited function:
private void CargoHUD(string reason)
{
if (debug) {Puts($"HUD STARTS");}
DestroyAllHUD();
HUDlist.Clear();
double colonnegauche = 0.10;
double colonnedroite = colonnegauche + 0.07;
double lignehaut = 1.00;
double lignebas = lignehaut - 0.05;
int round = 0;
List<Vector3> positionlist = new List<Vector3>();
List<BaseEntity> droplist = new List<BaseEntity>();
Vector3[] positionarray;
BaseEntity[] droparray;
/*if (reason == "spawn")
{
}*/
if (reason == "dropped")
{
if (debug) {Puts($"HUD FOR DROP");}
foreach (var Suppliez in entsupply)
{
Vector3 supplyupdated = Suppliez.Key.transform.position;
if (debug) {Puts($"REFRESHED SUPPLY POSITION {supplyupdated}");}
dropposition.Remove(Suppliez.Key);
dropposition.Add(Suppliez.Key, supplyupdated);
}
foreach (var pair in dropposition)
{
//droplist.Remove(pair.Key);
droplist.Add(pair.Key);
positionlist.Add(pair.Value);
}
droparray = droplist.ToArray();
positionarray = positionlist.ToArray();
int dropnum = droplist.Count;
string message = "";
List<string> HUDforplayers = new List<string>();
foreach (var player in BasePlayer.activePlayerList.ToList())
{
HUDforplayers = new List<string>();
foreach(Vector3 drop_posi in positionlist)
{
if (debug) {Puts($"round {round} on {dropnum}");}
double colonnedecalage = 0.08 * round++;
bool HUDview = permission.UserHasPermission(player.UserIDString, MapMyAirdropHUD);
var CuiElement = new CuiElementContainer();
string CargoHUDBanner = CuiElement.Add(new CuiPanel{Image ={Color = "0.5 0.5 0.5 0.2"},RectTransform ={AnchorMin = $"{colonnegauche + colonnedecalage} {lignebas}",AnchorMax = $"{colonnedroite + colonnedecalage} {lignehaut}"},CursorEnabled = false});
//}, new CuiElement().Parent = "Overlay", CargoHUDBanner);
var closeButton = new CuiButton{Button ={Close = CargoHUDBanner,Color = "0.0 0.0 0.0 0.6"},RectTransform ={AnchorMin = "0.90 0.00",AnchorMax = "1.00 1.00"},Text ={Text = "X",FontSize = 8,Align = TextAnchor.MiddleCenter}};
CuiElement.Add(closeButton, CargoHUDBanner); // close button in case plugin reload while HUD are on.
if (debug) {Puts($"PLAYER BEFORE DISTANCE");}
int dist = (int)Vector3.Distance(drop_posi, player.transform.position);
message = String.Format(lang.GetMessage("HUDDistanceMsg", this, player.UserIDString),dist.ToString());
if (debug) {Puts($"PLAYER DISTANCE MESSAGE DONE : {message}");}
var playerdistance = CuiElement.Add(new CuiLabel
{Text = {Text = String.Format(lang.GetMessage("HUDAirdropMsg", this, player.UserIDString),round,message), Color = "1.0 1.0 1.0 1.0", FontSize = 10, Align = TextAnchor.MiddleCenter},
RectTransform = {AnchorMin = $"0.0 0.0", AnchorMax = $"0.85 1.0"}
}, CargoHUDBanner);
if (HUDview)
{
CuiHelper.AddUi(player, CuiElement);
}
HUDforplayers.Add(CargoHUDBanner);
}
HUDlist.Remove(player);
HUDlist.Add(player, HUDforplayers);
}
}
}
It will loop through all drops with a "foreach()" instead of a wrong indexed "for()".