More fixes

This commit is contained in:
Lukas Moungos
2019-07-20 13:27:03 +02:00
parent 2cfff8579a
commit 3b2918ecc2
4 changed files with 15 additions and 26 deletions

View File

@@ -106,7 +106,7 @@ namespace ReallifeGamemode.Server.Extensions
foreach(var copPlayer in NAPI.Pools.GetAllPlayers())
{
User copUser = copPlayer.GetUser();
if((copUser.FactionId == 1 || copUser.FactionId == 3) && cop != null)
if(cop != null && (copUser.FactionId == 1 || copUser.FactionId == 3))
{
ChatService.SendMessage(copPlayer, "~r~HQ: Straftat gemeldet von " + cop.Name + " mit Fahndungslevel "+ amount +". Straftäter: "+ user.Name + ".");
ChatService.SendMessage(copPlayer, "~r~HQ: Grund: " + reason + ".");