Miese Corona Zeiten push für Lenhardt

This commit is contained in:
Siga
2020-05-10 19:19:53 +02:00
parent 15e4cec8ee
commit efbff34c21
159 changed files with 8042 additions and 8695 deletions

View File

@@ -13,30 +13,29 @@ using ReallifeGamemode.Server.Extensions;
namespace ReallifeGamemode.Server.Managers
{
public class LoadManager : Script
{
[ServerEvent(Event.ResourceStart)]
public void OnResourceStart()
{
using (var dbContext = new DatabaseContext())
{
foreach (SavedBlip b in dbContext.Blips)
[ServerEvent(Event.ResourceStart)]
public void OnResourceStart()
{
if (b.Active == true)
{
NAPI.Blip.CreateBlip((uint)b.Sprite, new Vector3(b.PositionX, b.PositionY, b.PositionZ), b.Scale,
b.Color, b.Name, b.Alpha, b.DrawDistance, b.ShortRange, (short)b.Rotation, b.Dimension);
}
}
using (var dbContext = new DatabaseContext())
{
foreach (SavedBlip b in dbContext.Blips)
{
if (b.Active == true)
{
NAPI.Blip.CreateBlip((uint)b.Sprite, new Vector3(b.PositionX, b.PositionY, b.PositionZ), b.Scale,
b.Color, b.Name, b.Alpha, b.DrawDistance, b.ShortRange, (short)b.Rotation, b.Dimension);
}
}
foreach (ServerVehicle veh in dbContext.ServerVehicles)
{
if (!veh.Active) continue;
foreach (ServerVehicle veh in dbContext.ServerVehicles)
{
if (!veh.Active) continue;
Vehicle current = veh.Spawn();
TuningManager.ApplyTuningToServerVehicle(veh);
Vehicle current = veh.Spawn();
TuningManager.ApplyTuningToServerVehicle(veh);
}
}
}
}
}
}
}