When i have 2 permissions with different slots, it sometimes picks the lowest one. Seems like, that having the bigger slots in config at the top of the array doesn't help.
This code helps:
This code helps:
int GetSlots (BasePlayer player)
{
var availableSlots = new List<int>();
availableSlots.Add(defaultSlots);
foreach (KeyValuePair<string, object> kvp in boxSlots) {
if (permission.UserHasPermission (player.UserIDString, kvp.Key)) {
availableSlots.Add(Convert.ToInt32 (kvp.Value));
}
}
return availableSlots.Max();
}Or maybe simple compairing would work