Changed whole project structure (split client and server into separat projects)

This commit is contained in:
hydrant
2019-02-25 22:12:05 +01:00
parent d2181c4987
commit 33abb3d04f
185 changed files with 282 additions and 596 deletions

View File

@@ -0,0 +1,41 @@
using GTANetworkAPI;
using reallife_gamemode.Server.Entities;
using reallife_gamemode.Server.Models;
using reallife_gamemode.Server.Saves;
/**
* @overview Life of German Reallife - Managers LoadManager (LoadManager.cs)
* @author VegaZ
* @copyright (c) 2008 - 2018 Life of German
*/
namespace reallife_gamemode.Server.Managers
{
public class LoadManager : Script
{
[ServerEvent(Event.ResourceStart)]
public void OnResourceStart()
{
using (var loadData = new DatabaseContext())
{
foreach (SavedBlip b in loadData.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 loadData.ServerVehicles)
{
if (!veh.Active) continue;
Vehicle current = veh.Spawn();
TuningManager.ApplyTuningToServerVehicle(veh);
}
}
}
}
}