fix tuning weg bei /respawnvehicle
This commit is contained in:
@@ -1171,8 +1171,8 @@ namespace ReallifeGamemode.Server.Commands
|
||||
}
|
||||
}
|
||||
|
||||
[Command("respawnvehicle")]
|
||||
public void CmdAdminRespawnVehicle(Player player, int? id = null)
|
||||
[Command("respawnvehicle", "~m~Benutzung: ~s~/respawnvehicle (Db ID)", Alias = "rveh")]
|
||||
public void CmdAdminRespawnVehicle(Player player, int id = -1)
|
||||
{
|
||||
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
|
||||
{
|
||||
@@ -1182,14 +1182,14 @@ namespace ReallifeGamemode.Server.Commands
|
||||
|
||||
Vehicle veh = null;
|
||||
|
||||
if (id == null)
|
||||
if (id == -1)
|
||||
{
|
||||
var nearestVeh = NAPI.Pools.GetAllVehicles().Where(v => v.Position.DistanceTo(player.Position) <= 5).FirstOrDefault();
|
||||
veh = nearestVeh;
|
||||
}
|
||||
else
|
||||
{
|
||||
veh = VehicleManager.GetVehicleFromId(id.Value);
|
||||
veh = VehicleManager.GetVehicleFromId(id);
|
||||
}
|
||||
|
||||
if (veh == null)
|
||||
|
||||
Reference in New Issue
Block a user