Added error message when goto-point doesnt exist
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user