+
+
+ Eingabe | Life of German
+
+
+
+
+
+
+
+
+
+
+
+
Willkommen auf Life of German
+
+
+ In dieser Info findest du alles wichtige zum Thema Steuerung und Funktionen.
+
+ Steuerung:
+ T - Chat öffnen
+ M - Interaktionsmenü öffnen und schließen
+ X - Fahrzeug auf-/abschließen sowie im Fahrzeuginteraktionsmenü öffnen
+ N - Fahrzeugmotor Starten
+ O - Onlineliste öffnen/schließen
+ I - Inventar öffnen/schließen
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ReallifeGamemode.Client/assets/js/Introduction/application.js b/ReallifeGamemode.Client/assets/js/Introduction/application.js
new file mode 100644
index 00000000..5e46270a
--- /dev/null
+++ b/ReallifeGamemode.Client/assets/js/Introduction/application.js
@@ -0,0 +1,25 @@
+
+let close = document.getElementById('close');
+
+close.onclick = function closeWindow() {
+ mp.trigger('removeIntroduction');
+ console.log('Fenster geschlossen!');
+}
+
+
+/* Enter wird im Input-Feld gedrückt */
+input.onkeyup = e => {
+ let code = e.keyCode ? e.keyCode : e.which;
+ if (code === 13) {
+ // TODO: Wert entgegennehmen
+ closeWindow();
+ }
+}
+
+/* ESC wird gedrückt */
+document.onkeyup = e => {
+ let code = e.keyCode ? e.keyCode : e.which;
+ if (code === 27) { closeWindow(); }
+}
+
+close.onclick = e => { closeWindow(); }
diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts
index 8102c94c..4a6b07c1 100644
--- a/ReallifeGamemode.Client/index.ts
+++ b/ReallifeGamemode.Client/index.ts
@@ -234,6 +234,9 @@ import bankMenuHandle from './Interaction/bankmenu';
import InputHelper from './inputhelper';
bankMenuHandle(globalData);
+import Introduction from './Gui/introduction';
+Introduction(globalData);
+
require('./Gui/policedepartment');
interface VehicleData {
diff --git a/ReallifeGamemode.Server/Bank/bank.cs b/ReallifeGamemode.Server/Bank/bank.cs
index 967aa731..31cefee7 100644
--- a/ReallifeGamemode.Server/Bank/bank.cs
+++ b/ReallifeGamemode.Server/Bank/bank.cs
@@ -1,7 +1,7 @@
/**
* @overview Life of German Reallife - Managers Interaction (InteractionManager.cs)
* @author MichaPlays
-* @copyright (c) 2008 - 2018 Life of German
+* @copyright (c) 2008 - 2021 Life of German
*/
using GTANetworkAPI;
using Newtonsoft.Json;
diff --git a/ReallifeGamemode.Server/Main.cs b/ReallifeGamemode.Server/Main.cs
index 44356a1c..7d9f1a24 100644
--- a/ReallifeGamemode.Server/Main.cs
+++ b/ReallifeGamemode.Server/Main.cs
@@ -17,6 +17,7 @@ using ReallifeGamemode.Server.Util;
using ReallifeGamemode.Services;
using System.Threading;
using Microsoft.EntityFrameworkCore;
+using ReallifeGamemode.Server.newbie;
/**
* @overview Life of German Reallife - Main Class (Main.cs)
@@ -130,6 +131,7 @@ namespace ReallifeGamemode.Server
PlaneSchool.Setup();
Gangwar.Gangwar.loadTurfs();
Bank.bank.Setup();
+ Introduction.Setup();
TempBlip tempBlip = new TempBlip()
{
diff --git a/ReallifeGamemode.Server/Managers/NewbieManager.cs b/ReallifeGamemode.Server/Managers/NewbieManager.cs
new file mode 100644
index 00000000..9939ead9
--- /dev/null
+++ b/ReallifeGamemode.Server/Managers/NewbieManager.cs
@@ -0,0 +1,17 @@
+using System.Linq;
+using GTANetworkAPI;
+using ReallifeGamemode.Database;
+using ReallifeGamemode.Database.Entities;
+using ReallifeGamemode.Database.Entities.Logs;
+using ReallifeGamemode.Database.Models;
+using ReallifeGamemode.Server.Util;
+
+namespace ReallifeGamemode.Server.Managers
+{
+ class NewbieManager : Script
+ {
+
+
+
+ }
+}
diff --git a/ReallifeGamemode.Server/newbie/Introduction.cs b/ReallifeGamemode.Server/newbie/Introduction.cs
new file mode 100644
index 00000000..1d31b55f
--- /dev/null
+++ b/ReallifeGamemode.Server/newbie/Introduction.cs
@@ -0,0 +1,46 @@
+using GTANetworkAPI;
+using Newtonsoft.Json;
+using ReallifeGamemode.Database.Models;
+using ReallifeGamemode.Server.Extensions;
+using ReallifeGamemode.Server.Finance;
+using ReallifeGamemode.Services;
+using System;
+
+/**
+* @overview Life of German Reallife - Managers Interaction (InteractionManager.cs)
+* @author MichaPlays
+* @copyright (c) 2008 - 2021 Life of German
+*/
+
+
+namespace ReallifeGamemode.Server.newbie
+{
+ class Introduction : Script
+ {
+ private static TextLabel informationLabel;
+ private static Marker marker;
+ private static ColShape _colShape;
+ public static Vector3 Position { get; }
+ public static void Setup()
+ {
+ informationLabel = NAPI.TextLabel.CreateTextLabel("Einführung", new Vector3(-1025.57, -2732.15, 13.75), 20.0f, 1.3f, 0, new Color(255, 255, 255));
+ marker = NAPI.Marker.CreateMarker(MarkerType.VerticalCylinder, new Vector3(-1025.57, -2732.15, 12.75), new Vector3(), new Vector3(), 2f, new Color(107, 0, 0));
+
+
+ _colShape = NAPI.ColShape.CreateSphereColShape(new Vector3(-1025.57, -2732.15, 13.75), 2f);
+ _colShape.OnEntityEnterColShape += EntityEnterBankColShape;
+ _colShape.OnEntityExitColShape += EntityExitBankColShape;
+ }
+ private static void EntityEnterBankColShape(ColShape colShape, Player client)
+ {
+ if (client.IsInVehicle || !client.IsLoggedIn()) return;
+
+ client.TriggerEvent("showIntroduction");
+ }
+
+ private static void EntityExitBankColShape(ColShape colShape, Player client)
+ {
+ client.TriggerEvent("removeIntroduction");
+ }
+ }
+}