[+] Add SchoolVehicle Class for Driving and Flight School
[*] Fixed and Improved Flight School
This commit is contained in:
@@ -1891,6 +1891,32 @@ namespace ReallifeGamemode.Server.Commands
|
||||
else ChatService.SendMessage(player, "~m~Du sitzt in keinem Fahrzeug!");
|
||||
break;
|
||||
|
||||
case "schoolvehicle":
|
||||
if (player.IsInVehicle)
|
||||
{
|
||||
if (option1 == null)
|
||||
{
|
||||
ChatService.SendMessage(player, "~m~Benutzung: ~s~/save schoolvehicle [FahrschuleID]");
|
||||
return;
|
||||
}
|
||||
if (!int.TryParse(option1, out int drivingSchoolId))
|
||||
{
|
||||
ChatService.SendMessage(player, "~m~Benutzung: ~s~/save schoolvehicle [FahrschuleID]");
|
||||
return;
|
||||
}
|
||||
if(drivingSchoolId > 2 || drivingSchoolId < 0)
|
||||
{
|
||||
ChatService.SendMessage(player, "~m~Diese Fahrschule existiert nicht.");
|
||||
return;
|
||||
}
|
||||
Vehicle vehicle = player.Vehicle;
|
||||
vehicle = SaveManager.SaveSchoolVehicleData(vehicle, (VehicleHash)vehicle.Model, vehicle.Position, vehicle.Heading, vehicle.NumberPlate,
|
||||
vehicle.PrimaryColor, vehicle.SecondaryColor, vehicle.Locked, vehicle.EngineStatus, drivingSchoolId);
|
||||
player.SendNotification("Fahrschulauto ~g~" + vehicle.DisplayName + "~s~ gespeichert.", true);
|
||||
player.SetIntoVehicle(vehicle, -1);
|
||||
}
|
||||
break;
|
||||
|
||||
case "location":
|
||||
if(option1 == null || option1.Length < 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user