improve hqmessage
This commit is contained in:
@@ -394,7 +394,7 @@ namespace ReallifeGamemode.Server.Commands
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReallifeGamemode.Server.Wanted.Jail.Release_Jail_Admin(player, target);
|
Jail.Release_Jail_Admin(player, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command("a", "~m~Benutzung: ~s~/a [Nachricht]", GreedyArg = true)]
|
[Command("a", "~m~Benutzung: ~s~/a [Nachricht]", GreedyArg = true)]
|
||||||
|
|||||||
@@ -78,14 +78,7 @@ namespace ReallifeGamemode.Server.Services
|
|||||||
/// <param name="minLevel">Das mindest Admin Level, das für das Erhalten dieser Nachricht benötigt wird</param>
|
/// <param name="minLevel">Das mindest Admin Level, das für das Erhalten dieser Nachricht benötigt wird</param>
|
||||||
public static void HQMessage(string message)
|
public static void HQMessage(string message)
|
||||||
{
|
{
|
||||||
foreach (var copPlayer in NAPI.Pools.GetAllPlayers())
|
BroadcastFaction("!{#8181E9}HQ: " + message, new List<int>() { 1, 3 });
|
||||||
{
|
|
||||||
User copUser = copPlayer.GetUser();
|
|
||||||
if ((copUser.FactionId == 1 || copUser.FactionId == 3))
|
|
||||||
{
|
|
||||||
ChatService.SendMessage(copPlayer, "!{#8181E9}HQ: " + message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void BroadcastAdmin(string message, AdminLevel minLevel)
|
public static void BroadcastAdmin(string message, AdminLevel minLevel)
|
||||||
@@ -127,7 +120,7 @@ namespace ReallifeGamemode.Server.Services
|
|||||||
|
|
||||||
internal static void BroadcastFaction(string message, List<int> factionIds)
|
internal static void BroadcastFaction(string message, List<int> factionIds)
|
||||||
{
|
{
|
||||||
using(var dbContext = new DatabaseContext())
|
using (var dbContext = new DatabaseContext())
|
||||||
{
|
{
|
||||||
BroadcastFaction(message, dbContext.Factions.Where(f => factionIds.Contains(f.Id)).ToList());
|
BroadcastFaction(message, dbContext.Factions.Where(f => factionIds.Contains(f.Id)).ToList());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user