/ga universell für alle GangOwned Fraktionen
This commit is contained in:
@@ -48,18 +48,17 @@ namespace ReallifeGamemode.Server.Commands
|
|||||||
{
|
{
|
||||||
User user = player.GetUser();
|
User user = player.GetUser();
|
||||||
Faction f = user?.Faction;
|
Faction f = user?.Faction;
|
||||||
if ((f == null || f.StateOwned) && !user.IsAdmin(AdminLevel.ADMIN))
|
if ((f == null || !f.GangOwned) && !user.IsAdmin(AdminLevel.ADMIN))
|
||||||
{
|
{
|
||||||
ChatService.NotAuthorized(player);
|
ChatService.NotAuthorized(player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (f?.Name == "Ballas" || f?.Name == "Grove" || user.IsAdmin(AdminLevel.ADMIN))
|
|
||||||
{
|
|
||||||
message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", "");
|
message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", "");
|
||||||
|
|
||||||
string rank = string.Empty;
|
string rank = string.Empty;
|
||||||
|
|
||||||
if (f?.Name == "Ballas" || f?.Name == "Grove")
|
if (f?.GangOwned == true)
|
||||||
{
|
{
|
||||||
rank = player.GetUser().GetFactionRank().RankName;
|
rank = player.GetUser().GetFactionRank().RankName;
|
||||||
}
|
}
|
||||||
@@ -74,11 +73,6 @@ namespace ReallifeGamemode.Server.Commands
|
|||||||
ChatService.BroadcastFaction(broadcastMessage, context.Factions.ToList().FindAll(c => c.GangOwned), true);
|
ChatService.BroadcastFaction(broadcastMessage, context.Factions.ToList().FindAll(c => c.GangOwned), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Command("r", "~m~Benutzung: ~s~/r [Nachricht]", GreedyArg = true)]
|
[Command("r", "~m~Benutzung: ~s~/r [Nachricht]", GreedyArg = true)]
|
||||||
public void CmdFactionR(Player player, string message)
|
public void CmdFactionR(Player player, string message)
|
||||||
|
|||||||
Reference in New Issue
Block a user