Add PlaneSchool & DrivingSchool licenses
This commit is contained in:
@@ -7,6 +7,7 @@ using ReallifeGamemode.Server.Services;
|
||||
using System.Linq;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
|
||||
namespace ReallifeGamemode.Server.DrivingSchool
|
||||
{
|
||||
@@ -171,22 +172,35 @@ namespace ReallifeGamemode.Server.DrivingSchool
|
||||
{
|
||||
ChatService.SendMessage(user, "Parke gleich seitlich ein");
|
||||
}
|
||||
else if (checkpoint == 25)
|
||||
{
|
||||
bool parked = false;
|
||||
float rotation;
|
||||
|
||||
while (!parked)
|
||||
/* else if (checkpoint == 25)
|
||||
{
|
||||
rotation = user.Vehicle.Rotation.Z;
|
||||
if (rotation >= 333.913 && rotation <= 354.6108)
|
||||
bool parked = false;
|
||||
float rotation;
|
||||
|
||||
while (!parked)
|
||||
{
|
||||
ChatService.SendMessage(user, "Perfekt!");
|
||||
parked = true;
|
||||
rotation = user.Vehicle.Rotation.Z;
|
||||
if (rotation >= 333.913 && rotation <= 354.6108)
|
||||
{
|
||||
ChatService.SendMessage(user, "Perfekt!");
|
||||
parked = true;
|
||||
}
|
||||
System.Threading.Thread.Sleep(100);
|
||||
}
|
||||
System.Threading.Thread.Sleep(100);
|
||||
}*/
|
||||
else if (checkpoint == 26)
|
||||
{
|
||||
ChatService.SendMessage(user, "Bestanden!");
|
||||
User spieler = user.GetUser();
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
User drivingUser = dbContext.Users.Where(u => u.Id == spieler.Id).FirstOrDefault();
|
||||
drivingUser.DriverLicenseVehicle = true;
|
||||
dbContext.SaveChanges();
|
||||
}
|
||||
//veh & client tp
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Command("ld", "~m~Benutzung: ~s~/lt")]
|
||||
|
||||
Reference in New Issue
Block a user