[+] Add SchoolVehicle Class for Driving and Flight School
[*] Fixed and Improved Flight School
This commit is contained in:
@@ -16,8 +16,6 @@ namespace ReallifeGamemode.Server.Events
|
||||
{
|
||||
if (seat != -1)
|
||||
return;
|
||||
|
||||
Console.WriteLine("inVEhicle");
|
||||
if (vehicle.GetServerVehicle() is FactionVehicle veh)
|
||||
{
|
||||
if (client.GetUser().FactionId != null && (veh.FactionId == client.GetUser().FactionId) && (veh.Model == VehicleHash.Burrito3) && vehicle.HasData("weaponDeal") && vehicle.GetData("weaponDeal") == true)
|
||||
|
||||
@@ -36,6 +36,21 @@ namespace ReallifeGamemode.Server.Events
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (vehicle.GetServerVehicle() is SchoolVehicle sVeh)
|
||||
{
|
||||
if (!player.HasData("ActiveSchool"))
|
||||
{
|
||||
player.StopAnimation();
|
||||
player.SendNotification("~r~Du darfst dieses Fahrzeug nicht benutzen!", true);
|
||||
return;
|
||||
}
|
||||
if (sVeh.SchoolId != player.GetData("ActiveSchool"))
|
||||
{
|
||||
player.StopAnimation();
|
||||
player.SendNotification("~r~Du darfst dieses Fahrzeug nicht benutzen!", true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user