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

@@ -453,7 +453,7 @@ namespace ReallifeGamemode.Server.Events
}
else if (sV is FactionVehicle fV)
{
if (fV.FactionId != u.FactionId && !state && !u.IsAdmin(AdminLevel.ADMIN3))
if (!fV.GetOwners().Contains(u.FactionId ?? 0) && !state && !u.IsAdmin(AdminLevel.ADMIN3))
{
player.SendNotification("~r~Du hast keinen Schlüssel.");
return;
@@ -509,7 +509,8 @@ namespace ReallifeGamemode.Server.Events
ServerVehicle veh = player.Vehicle.GetServerVehicle();
if (veh != null)
{
if (veh is FactionVehicle fV && fV.FactionId != player.GetUser()?.FactionId && (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN3) ?? false))
User u = player.GetUser();
if (veh is FactionVehicle fV && !fV.GetOwners().Contains(u.FactionId ?? 0) && (!u.IsAdmin(AdminLevel.ADMIN3)))
{
return;
}