Test NoobVehicles

This commit is contained in:
Mac_Slash
2020-04-21 14:20:53 +02:00
parent a2fb8c531e
commit e98150e4c4
6 changed files with 63 additions and 8 deletions

View File

@@ -1985,7 +1985,7 @@ namespace ReallifeGamemode.Server.Commands
}
}
[Command("save", "~m~Benutzung: ~s~/save [Typ = ~g~Blip~s~, ~g~Goto (X)~s~, ~r~Marker~s~, ~r~Ped~s~, ~r~Pickup~s~, ~r~TextLabel~s~, ~g~Vehicle~s~, ~g~FVehicle~s~, ~g~SVehicle (X)~s~, ~g~JVehicle (X)~s~, ~g~Location~s~] (Weitere Angaben) = (X)", GreedyArg = true)]
[Command("save", "~m~Benutzung: ~s~/save [Typ = ~g~Blip~s~, ~g~Goto (X)~s~, ~r~Marker~s~, ~r~Ped~s~, ~r~Pickup~s~, ~r~TextLabel~s~, ~g~Vehicle~s~, ~g~FVehicle~s~, ~g~SVehicle (X)~s~, ~g~JVehicle (X)~s~, ~g~ShoolVehicle (X)~s~, ~g~NoobVehicle~s~, ~g~Location~s~] (Weitere Angaben) = (X)", GreedyArg = true)]
public void CmdAdminSave(Player player, string typ, string option1 = null, string option2 = null)
{
if (!player.GetUser()?.IsAdmin(AdminLevel.HEADADMIN) ?? true)
@@ -2164,6 +2164,16 @@ namespace ReallifeGamemode.Server.Commands
player.SetIntoVehicle(vehicle, 0);
}
break;
case "noobvehicle":
if (player.IsInVehicle)
{
Vehicle vehicle = player.Vehicle;
vehicle = SaveManager.SaveNoobVehicleData(vehicle, (VehicleHash)vehicle.Model, vehicle.Position, vehicle.Heading, vehicle.NumberPlate,
vehicle.PrimaryColor, vehicle.SecondaryColor, vehicle.Locked, vehicle.EngineStatus);
player.SendNotification("Noobfahrzeug ~g~" + vehicle.DisplayName + "~s~ gespeichert.", true);
player.SetIntoVehicle(vehicle, 0);
}
break;
case "location":
if (option1 == null || option1.Length < 0)