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