Day 254 : Fixes

This commit is contained in:
Lukas Moungos
2019-07-20 15:25:38 +02:00
parent dbb6f49c8b
commit 28e6a461f0
5 changed files with 45 additions and 51 deletions

View File

@@ -52,7 +52,7 @@ namespace ReallifeGamemode.Server.Wanted
foreach (var playerCop in NAPI.Pools.GetAllPlayers())
{
User cop = playerCop.GetUser();
if (cop.FactionId == 1 || cop.FactionId == 3)
if (cop != null && (cop.FactionId == 1 || cop.FactionId == 3))
{
if (cop.GetData<bool>("duty") && playerCop.Position.DistanceTo2D(player.Position) <= 500)
{