inshallah kein fehler

This commit is contained in:
hydrant
2020-05-10 23:18:53 +02:00
153 changed files with 6517 additions and 3407 deletions

View File

@@ -1,18 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
using ReallifeGamemode.Server.Extensions;
using ReallifeGamemode.Server.Util;
using ReallifeGamemode.Server.Services;
using System.Linq;
using GTANetworkAPI;
using ReallifeGamemode.Database.Entities;
using ReallifeGamemode.Database.Models;
using ReallifeGamemode.Server.Extensions;
using ReallifeGamemode.Server.Managers;
using ReallifeGamemode.Server.Util;
namespace ReallifeGamemode.Server.DrivingSchool
{
class DrivingSchool : Script
internal class DrivingSchool : Script
{
private static TextLabel informationLabel;
private static Marker marker;
@@ -40,6 +36,7 @@ namespace ReallifeGamemode.Server.DrivingSchool
{
new Vector3(-813.57, -1290.37, 4.59),
}.AsReadOnly();
private readonly IReadOnlyCollection<Vector3> DrivingRoute = new List<Vector3>
{
//BEGIN
@@ -80,12 +77,12 @@ namespace ReallifeGamemode.Server.DrivingSchool
new Vector3(-617.66, -1259.34, 9.82),
new Vector3(-758.35, -1285.03, 3.48),
}.AsReadOnly();
private readonly IReadOnlyCollection<Vector3> StopCar = new List<Vector3>
{
new Vector3(-788.66, -1278.75, 4),
}.AsReadOnly();
public static void Setup()
{
informationLabel = NAPI.TextLabel.CreateTextLabel("Fahrschule\n~y~Auto ~s~- $~g~2500\n~y~Motorrad ~s~- $~g~3500", new Vector3(-813.17, -1354.5, 5.14), 20.0f, 1.3f, 0, new Color(255, 255, 255));
@@ -181,7 +178,6 @@ namespace ReallifeGamemode.Server.DrivingSchool
user.Position = new Vector3(-813.17, -1354.5, 4.14);
}
[RemoteEvent("drivingSchoolEvent")]
public void DrivingSchoolEvent(Player user, int checkpoint)
{
@@ -189,7 +185,6 @@ namespace ReallifeGamemode.Server.DrivingSchool
{
user.TriggerEvent("renderTextOnScreen", "Sollten Sie aus dem Fahrzeug aussteigen fallen Sie durch.");
}
else if (checkpoint == 9)
{
user.TriggerEvent("renderTextOnScreen", "Fahre zwischen den Laternen Slalom.");
@@ -205,8 +200,6 @@ namespace ReallifeGamemode.Server.DrivingSchool
}
}
[RemoteEvent("startBikeSchool")]
public void StartBikeSchool(Player client)
{
@@ -233,7 +226,6 @@ namespace ReallifeGamemode.Server.DrivingSchool
client.TriggerEvent("waitPlayerEntersVehicle");
}
[RemoteEvent("bikeSchoolEventEnd")]
public void bikeSchoolEventEnd(Player user, int checkpoint)
{
@@ -258,7 +250,6 @@ namespace ReallifeGamemode.Server.DrivingSchool
user.Position = new Vector3(-813.17, -1354.5, 4.14);
}
[RemoteEvent("bikeSchoolEvent")]
public void bikeSchoolEvent(Player user, int checkpoint)
{
@@ -272,6 +263,5 @@ namespace ReallifeGamemode.Server.DrivingSchool
CheckPointHandle.StartCheckPointRoute(user, StopBike, 5000, 1, 7, 3, true, "bikeSchoolEventEnd");
}
}
}
}

View File

@@ -1,7 +1,4 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace ReallifeGamemode.Server.DrivingSchool
{
@@ -19,7 +16,6 @@ namespace ReallifeGamemode.Server.DrivingSchool
[JsonProperty("weaponLicense")]
public bool WeaponLicense { get; set; }
public Licenses(bool CarLicense, bool BikeLicense, bool PlaneLicense, bool weaponLicense)
{
this.CarLicense = CarLicense;
@@ -27,6 +23,5 @@ namespace ReallifeGamemode.Server.DrivingSchool
this.PlaneLicense = PlaneLicense;
this.WeaponLicense = weaponLicense;
}
}
}

View File

@@ -1,18 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
using ReallifeGamemode.Server.Extensions;
using ReallifeGamemode.Server.Util;
using ReallifeGamemode.Server.Services;
using System.Linq;
using GTANetworkAPI;
using ReallifeGamemode.Database.Entities;
using ReallifeGamemode.Database.Models;
using ReallifeGamemode.Server.Extensions;
using ReallifeGamemode.Server.Managers;
using ReallifeGamemode.Server.Util;
namespace ReallifeGamemode.Server.DrivingSchool
{
class PlaneSchool : Script
internal class PlaneSchool : Script
{
private static TextLabel informationLabel1;
private static Marker marker1;
@@ -38,16 +34,13 @@ namespace ReallifeGamemode.Server.DrivingSchool
new Vector3(-869.77, -1424.05, 133),
}.AsReadOnly();
private readonly IReadOnlyCollection<Vector3> planeRouteEnd = new List<Vector3>
{
new Vector3(-1164.29, -2351.52, 14.88),
}.AsReadOnly();
public static void Setup()
{
informationLabel1 = NAPI.TextLabel.CreateTextLabel("Flugschule\n~y~Flugschein ~s~- $~g~5000", new Vector3(-1083.96, -2476.96, 14.07), 20.0f, 1.3f, 0, new Color(255, 255, 255));
marker1 = NAPI.Marker.CreateMarker(MarkerType.VerticalCylinder, new Vector3(-1083.96, -2476.96, 13.07), new Vector3(), new Vector3(), 1f, new Color(255, 255, 255));
@@ -56,6 +49,7 @@ namespace ReallifeGamemode.Server.DrivingSchool
_colShape1.OnEntityExitColShape += EntityExitBusinessColShape;
NAPI.Blip.CreateBlip(90, new Vector3(-1083.96, -2476.96, 14.07), 1.0f, 4, "Flugschule", shortRange: true);
}
private static void EntityEnterBusinessColShape(ColShape colShape, Player client)
{
if (client.IsInVehicle || !client.IsLoggedIn()) return;
@@ -132,6 +126,7 @@ namespace ReallifeGamemode.Server.DrivingSchool
user.ResetData("ActiveSchool");
user.Position = new Vector3(-1083.96, -2476.96, 13.07);
}
[RemoteEvent("planeSchoolEvent")]
public void planeSchoolEvent(Player user, int checkpoint)
{
@@ -177,11 +172,7 @@ namespace ReallifeGamemode.Server.DrivingSchool
user.TriggerEvent("renderTextOnScreen", "Setze zum landeflug an. Drücke 'G' um ihr Fahrwerk auszufahren.");
CheckPointHandle.StartCheckPointRoute(user, planeRouteEnd, 5000, 6, 12, 5, true, "planeSchoolEventEnd");
break;
}
}
}
}