Changed whole project structure (split client and server into separat projects)
This commit is contained in:
64
ReallifeGamemode.Server/Main.cs
Normal file
64
ReallifeGamemode.Server/Main.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using System.Globalization;
|
||||
using GTANetworkAPI;
|
||||
using reallife_gamemode.Server.Classes;
|
||||
using reallife_gamemode.Server.Managers;
|
||||
using reallife_gamemode.Server.Util;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Main Class (Main.cs)
|
||||
* @author VegaZ, hydrant
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace reallife_gamemode
|
||||
{
|
||||
public class Main : Script
|
||||
{
|
||||
public static readonly Vector3 DEFAULT_SPAWN_POSITION = new Vector3(-427.5189, 1116.453, 326.7829);
|
||||
public static readonly float DEFAULT_SPAWN_HEADING = 340.8f;
|
||||
|
||||
public static readonly CultureInfo SERVER_CULTURE = new CultureInfo("de-DE");
|
||||
|
||||
[ServerEvent(Event.ResourceStart)]
|
||||
public void OnResourceStart()
|
||||
{
|
||||
NAPI.Server.SetGlobalServerChat(false);
|
||||
|
||||
NAPI.Server.SetCommandErrorMessage("~r~[FEHLER]~s~ Dieser Command existiert nicht.");
|
||||
NAPI.Server.SetDefaultSpawnLocation(DEFAULT_SPAWN_POSITION, DEFAULT_SPAWN_HEADING);
|
||||
NAPI.Server.SetAutoSpawnOnConnect(false);
|
||||
NAPI.Server.SetAutoRespawnAfterDeath(false);
|
||||
NAPI.Data.SetWorldData("playerCreatorDimension", 0);
|
||||
|
||||
|
||||
InventoryManager.LoadItems();
|
||||
TuningManager.AddTuningGarage(new Vector3(-341, -134, 38.5)); // Downtown LS
|
||||
TuningManager.AddTuningGarage(new Vector3(732, -1088, 21)); // LS Intersection
|
||||
TuningManager.AddTuningGarage(new Vector3(-1155, -2006, 12)); // LS Airport
|
||||
TuningManager.AddTuningGarage(new Vector3(110, 6628, 31)); // Paleto Bay
|
||||
TuningManager.AddTuningGarage(new Vector3(1175, 2639, 37)); // Route 69
|
||||
|
||||
TimeManager.StartTimeManager();
|
||||
|
||||
DatabaseHelper.InitDatabaseFirstTime();
|
||||
|
||||
FactionHelper.CheckFactionBankAccounts();
|
||||
BusinessManager.LoadBusinesses();
|
||||
InteriorManager.LoadInteriors();
|
||||
DoorManager.LoadDoors();
|
||||
|
||||
|
||||
TempBlip tempBlip = new TempBlip()
|
||||
{
|
||||
Color = 1,
|
||||
Name = "",
|
||||
Transparency = 0,
|
||||
ShortRange = true,
|
||||
Sprite = 1,
|
||||
Scale = 1,
|
||||
};
|
||||
|
||||
NAPI.Data.SetWorldData("blipTemplate", tempBlip);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user