Fixed Group Menu
This commit is contained in:
@@ -58,7 +58,6 @@ namespace ReallifeGamemode.Server.Events
|
||||
|
||||
GroundItem.PickUpGroundItem(player);
|
||||
}
|
||||
|
||||
/*
|
||||
[RemoteEvent("keyPress:LEFT_ARROW")]
|
||||
public void KeyPressLeftArrow(Player player)
|
||||
@@ -84,7 +83,6 @@ namespace ReallifeGamemode.Server.Events
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
[RemoteEvent("keyPress:RIGHT_ARROW")]
|
||||
public void KeyPressRightArrow(Player player)
|
||||
{
|
||||
@@ -156,9 +154,9 @@ namespace ReallifeGamemode.Server.Events
|
||||
nextPayday = u.PaydayTimer
|
||||
};
|
||||
|
||||
string faction = u.Faction?.Name;
|
||||
string faction = u.Faction?.Name ?? "Zivilist";
|
||||
string factionleader = u.FactionLeader ? u.Faction.Name : null;
|
||||
string group = u.Group != null && u.GroupRank >= GroupRank.MANAGER ? u.Group.Name : null;
|
||||
string group = u.Group != null ? u.Group.Name : null;
|
||||
bool factionInvite = player.HasData("accept_faction_invite");
|
||||
bool groupInvite = player.HasData("accept_group_invite");
|
||||
bool ticket_boolean = player.HasData("ticket_boolean");
|
||||
|
||||
@@ -307,7 +307,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
return;
|
||||
}
|
||||
|
||||
if (targetUser?.GroupRank >= GroupRank.MANAGER && playerUser?.GroupRank != GroupRank.OWNER)
|
||||
if (targetUser?.GroupRank >= GroupRank.MANAGER)
|
||||
{
|
||||
ChatService.ErrorMessage(player, "Du kannst keinen Leader uninviten");
|
||||
return;
|
||||
@@ -343,6 +343,11 @@ namespace ReallifeGamemode.Server.Managers
|
||||
{
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
if (playerUser.GroupRank != GroupRank.OWNER)
|
||||
{
|
||||
ChatService.ErrorMessage(player, "Nur Besitzer können Manager hinzufügen");
|
||||
return;
|
||||
}
|
||||
if (targetUser?.Group.Id != playerUser?.Group.Id)
|
||||
{
|
||||
ChatService.ErrorMessage(player, "Dieser Spieler ist nicht in deiner Gruppe");
|
||||
@@ -351,7 +356,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
|
||||
if (player.Name == name)
|
||||
{
|
||||
ChatService.ErrorMessage(player, "Du bist schon Leader");
|
||||
ChatService.ErrorMessage(player, "Du bist schon Besitzer");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -394,7 +399,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
var newOwner = memberList.OrderByDescending(c => c.GroupRank).First();
|
||||
|
||||
newOwner.GroupRank = GroupRank.OWNER;
|
||||
ChatService.BroadcastGroup("~y~" + newOwner.Name + "~s~ wurde zum neuen Owner ernannt", playerUser.Group);
|
||||
ChatService.BroadcastGroup("~y~" + newOwner.Name + "~s~ wurde zum neuen Besitzer ernannt", playerUser.Group);
|
||||
}
|
||||
|
||||
playerUser.GroupRank = GroupRank.NONE;
|
||||
|
||||
Reference in New Issue
Block a user