Driving School
This commit is contained in:
@@ -175,4 +175,4 @@ import planeSchoolHandle from './util/planeschool';
|
|||||||
planeSchoolHandle(globalData);
|
planeSchoolHandle(globalData);
|
||||||
|
|
||||||
import PilotRouteList from './Jobs/PilotRouteSelect';
|
import PilotRouteList from './Jobs/PilotRouteSelect';
|
||||||
PilotRouteList(globalData);
|
PilotRouteList(globalData);
|
||||||
|
|||||||
@@ -90,6 +90,8 @@ namespace ReallifeGamemode.Database.Entities
|
|||||||
|
|
||||||
public int PaydayTimer { get; set; }
|
public int PaydayTimer { get; set; }
|
||||||
|
|
||||||
|
public bool DriverLicenseVehicle { get; set; }
|
||||||
|
|
||||||
public bool IsAdmin(AdminLevel level) => AdminLevel >= level;
|
public bool IsAdmin(AdminLevel level) => AdminLevel >= level;
|
||||||
|
|
||||||
public IBankAccount GetBankAccount(DatabaseContext databaseContext = null)
|
public IBankAccount GetBankAccount(DatabaseContext databaseContext = null)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using ReallifeGamemode.Server.Util;
|
|||||||
using ReallifeGamemode.Server.Services;
|
using ReallifeGamemode.Server.Services;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using GTANetworkAPI;
|
using GTANetworkAPI;
|
||||||
|
using ReallifeGamemode.Database.Entities;
|
||||||
|
|
||||||
namespace ReallifeGamemode.Server.DrivingSchool
|
namespace ReallifeGamemode.Server.DrivingSchool
|
||||||
{
|
{
|
||||||
@@ -89,12 +90,16 @@ namespace ReallifeGamemode.Server.DrivingSchool
|
|||||||
}
|
}
|
||||||
|
|
||||||
[RemoteEvent("startDrivingSchool")]
|
[RemoteEvent("startDrivingSchool")]
|
||||||
public void StartDrivingSchool(Client user)
|
public void StartDrivingSchool(Client client)
|
||||||
{
|
{
|
||||||
ChatService.SendMessage(user, "Du hast die Führerscheinprüfung gestartet.");
|
User user = client.GetUser();
|
||||||
ChatService.SendMessage(user, "Steige nun in eines der Fahrschulautos");
|
if (user.DriverLicenseVehicle)
|
||||||
|
return;
|
||||||
|
|
||||||
user.TriggerEvent("waitPlayerEntersVehicle");
|
ChatService.SendMessage(client, "Du hast die Führerscheinprüfung gestartet.");
|
||||||
|
ChatService.SendMessage(client, "Steige nun in eines der Fahrschulautos");
|
||||||
|
|
||||||
|
client.TriggerEvent("waitPlayerEntersVehicle");
|
||||||
}
|
}
|
||||||
|
|
||||||
[RemoteEvent("timerCheckVehicle")]
|
[RemoteEvent("timerCheckVehicle")]
|
||||||
|
|||||||
Reference in New Issue
Block a user