Adapted Save- and LoadManager to new Vehicle System

This commit is contained in:
hydrant
2018-11-29 20:04:40 +01:00
parent b83c071e45
commit fab3f05575
8 changed files with 114 additions and 66 deletions

View File

@@ -1,4 +1,6 @@
using GTANetworkAPI;
using reallife_gamemode.Server.Entities;
using reallife_gamemode.Server.Extensions;
using System.Collections.Generic;
namespace reallife_gamemode.Server.Managers
@@ -19,7 +21,12 @@ namespace reallife_gamemode.Server.Managers
{
if(c.IsInVehicle)
{
c.TriggerEvent("showTuningInfo", c.GetData("duty"));
Vehicle v = c.Vehicle;
if(v.GetServerVehicle() is FactionVehicle fV && fV.GetFaction().StateOwned)
{
return;
}
c.TriggerEvent("showTuningInfo");
}
};