Added error message when goto-point doesnt exist

This commit is contained in:
hydrant
2018-10-28 17:27:34 +01:00
parent e35a64c606
commit 945b2bff09

View File

@@ -274,6 +274,12 @@ namespace reallife_gamemode.Server.Commands
{
Entities.GotoPoint p = dbContext.GotoPoints.FirstOrDefault(x => x.Description == location);
if(p == null)
{
player.SendChatMessage("~r~[FEHLER]~s~ Dieser Goto-Punkt existiert nicht.");
return;
}
if (player.IsInVehicle && player.VehicleSeat == -1) player.Vehicle.Position = new Vector3(p.X, p.Y, p.Z);
else player.Position = new Vector3(p.X, p.Y, p.Z);