MfG, DimGamer

This commit is contained in:
hydrant
2020-03-25 21:33:32 +01:00
parent 16be2869a0
commit 0d8249c39c
16 changed files with 1527 additions and 61 deletions

View File

@@ -31,10 +31,11 @@ namespace ReallifeGamemode.Server.Managers
colShape.OnEntityEnterColShape += (cs, c) =>
{
using var dbContext = new DatabaseContext();
if (c.IsInVehicle)
{
Vehicle v = c.Vehicle;
if (v.GetServerVehicle() is FactionVehicle fV && fV.GetFaction().StateOwned)
if (v.GetServerVehicle() is FactionVehicle fV && fV.GetOwners().TrueForAll(fV => dbContext.Factions.Where(f => f.Id == fV).First().StateOwned))
{
return;
}