Nachträgliche Migrationsänderung
This commit is contained in:
@@ -29,7 +29,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
return;
|
||||
List<Vector3> dealPoint = new List<Vector3>();
|
||||
dealPoint.Add(vector);
|
||||
CheckPointHandle.StartCheckPointRoute(client, dealPoint, 5000, 1, 7, "loadWeaponTransport");
|
||||
CheckPointHandle.StartCheckPointRoute(client, dealPoint, 5000, 1, 7, 4, "loadWeaponTransport");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,10 +14,12 @@ namespace ReallifeGamemode.Server.Events
|
||||
{
|
||||
public class ExitVehicle : Script
|
||||
{
|
||||
object LastVehicle;
|
||||
public static Timer timerNoobRollerRespawn = new Timer(10000); //10 Minuten Timer NoobRollerRespawn
|
||||
[ServerEvent(Event.PlayerExitVehicleAttempt)]
|
||||
public void OnPlayerExitVehicle(Player client, GTANetworkAPI.Vehicle vehicle)
|
||||
{
|
||||
LastVehicle = vehicle;
|
||||
if (client.VehicleSeat != 0)
|
||||
return;
|
||||
if (vehicle.GetServerVehicle() is FactionVehicle veh)
|
||||
@@ -48,10 +50,14 @@ namespace ReallifeGamemode.Server.Events
|
||||
vehicle.SetData("NoobSpawnVehicleTimer", true);
|
||||
timerNoobRollerRespawn.AutoReset = false;
|
||||
timerNoobRollerRespawn.Elapsed += Timer600000_Elapsed;
|
||||
//LastVehicle = vehicle;
|
||||
//timerNoobRollerRespawn.Elapsed += async (sender, e) => {await
|
||||
}
|
||||
}
|
||||
private static void Timer600000_Elapsed(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
//ExitVehicle c = new ExitVehicle();
|
||||
//Vehicle veh = c.LastVehicle;
|
||||
NAPI.Task.Run(() =>
|
||||
{
|
||||
NAPI.Pools.GetAllVehicles().ForEach(v =>
|
||||
|
||||
@@ -483,7 +483,10 @@ namespace ReallifeGamemode.Server.Events
|
||||
}
|
||||
else if (sV is FactionVehicle fV)
|
||||
{
|
||||
if (!fV.GetOwners().Contains(u.FactionId ?? 0) && !state && !(u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty()))
|
||||
if (u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty())
|
||||
{
|
||||
}
|
||||
else if (!fV.GetOwners().Contains(u.FactionId ?? 0) && !state && !(u.IsAdmin(AdminLevel.HEADADMIN)))
|
||||
{
|
||||
player.SendNotification("~r~Du hast keinen Schlüssel.");
|
||||
return;
|
||||
@@ -491,7 +494,10 @@ namespace ReallifeGamemode.Server.Events
|
||||
}
|
||||
else if (sV is GroupVehicle gV)
|
||||
{
|
||||
if (gV.GroupId != u.Group.Id && !state && !u.IsAdmin(AdminLevel.ADMIN3))
|
||||
if (u.IsAdmin(AdminLevel.ADMIN3) && player.IsAdminDuty())
|
||||
{
|
||||
}
|
||||
else if (gV.GroupId != u.Group.Id && !state && !u.IsAdmin(AdminLevel.ADMIN3))
|
||||
{
|
||||
player.SendNotification("~r~Du hast keinen Schlüssel.");
|
||||
return;
|
||||
@@ -499,56 +505,73 @@ namespace ReallifeGamemode.Server.Events
|
||||
}
|
||||
else if (sV is JobVehicle jV)
|
||||
{
|
||||
if (!jV.GetJob().GetUsersInJob().Contains(player) && !u.IsAdmin(AdminLevel.ADMIN3) && player.IsAdminDuty())
|
||||
{
|
||||
player.SendNotification("~r~Du hast keinen Schlüssel.");
|
||||
return;
|
||||
}
|
||||
if(player.IsAdminDuty())
|
||||
//if (jV.GetJob().GetUsersInJob().Contains(player))
|
||||
if (u.IsAdmin(AdminLevel.ADMIN3) && player.IsAdminDuty())
|
||||
{
|
||||
}
|
||||
else
|
||||
else if (jV.GetJob().Id == u.JobId)
|
||||
{
|
||||
if (u.JobId == 4)
|
||||
{
|
||||
if (v.Model == (uint)Types.VehicleModel.Coach)
|
||||
{
|
||||
if (u.JobId == 3)
|
||||
{
|
||||
if (u.BusSkill < 300)
|
||||
if (v.Model == (uint)Types.VehicleModel.Cuban800)
|
||||
{
|
||||
player.SendNotification("~r~Dein Skilllevel(2) ist nicht hoch genug!");
|
||||
return;
|
||||
}
|
||||
else
|
||||
if (v.Model == (uint)Types.VehicleModel.Velum || v.Model == (uint)Types.VehicleModel.Velum2)
|
||||
{
|
||||
|
||||
if (u.PilotSkill < 300)
|
||||
{
|
||||
player.SendNotification("~r~Dein Skilllevel(2) ist nicht hoch genug!");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
if (v.Model == (uint)Types.VehicleModel.Tourbus)
|
||||
if (u.JobId == 4)
|
||||
{
|
||||
if (u.BusSkill < 800)
|
||||
if (v.Model == (uint)Types.VehicleModel.Coach)
|
||||
{
|
||||
player.SendNotification("~r~Dein Skilllevel(3) ist nicht hoch genug!");
|
||||
return;
|
||||
if (u.BusSkill < 300)
|
||||
{
|
||||
player.SendNotification("~r~Dein Skilllevel(2) ist nicht hoch genug!");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
if (v.Model == (uint)Types.VehicleModel.Tourbus)
|
||||
{
|
||||
|
||||
if (u.BusSkill < 800)
|
||||
{
|
||||
player.SendNotification("~r~Dein Skilllevel(3) ist nicht hoch genug!");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (sV is UserVehicle uV)
|
||||
{
|
||||
if (uV.UserId != u.Id)
|
||||
else
|
||||
{
|
||||
player.SendNotification("~r~Du hast keinen Schlüssel.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (sV is JobVehicle)
|
||||
else if (sV is UserVehicle uV)
|
||||
{
|
||||
return;
|
||||
if (u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty())
|
||||
{
|
||||
}
|
||||
else if (uV.UserId != u.Id && !u.IsAdmin(AdminLevel.HEADADMIN))
|
||||
{
|
||||
player.SendNotification("~r~Du hast keinen Schlüssel.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
VehicleStreaming.SetEngineState(v, !state);
|
||||
|
||||
Reference in New Issue
Block a user