From 67e30033e51b68b25eba3735d058f7815017bf45 Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 20 Oct 2018 15:45:56 +0200 Subject: [PATCH] Added error message to /gotomark if no mark is set --- Server/Commands/Admin.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Server/Commands/Admin.cs b/Server/Commands/Admin.cs index 9a898239..a47d5106 100644 --- a/Server/Commands/Admin.cs +++ b/Server/Commands/Admin.cs @@ -1136,7 +1136,6 @@ namespace reallife_gamemode.Server.Commands } } - [Command("spec", "~m~Benutzung: ~s~/spec [Player]")] public void CmdAdminSpectate(Client player, string name) { @@ -1232,6 +1231,7 @@ namespace reallife_gamemode.Server.Commands } } } + [Command("setmoney")] public void SetPlayerMoney(Client player, string receiver, float amount) { @@ -1243,6 +1243,7 @@ namespace reallife_gamemode.Server.Commands Client target = ClientService.GetClientByName(receiver); target.SetSharedData("money", amount); } + //TODO [Command("fpay")] public void FPay(Client player, string receiver, float amount) @@ -1258,6 +1259,7 @@ namespace reallife_gamemode.Server.Commands BankManager.TransferUserMoneyToFaction(player.GetUser(), receiverUser, amount, "/FPAY"); } } + //TODO Ausführen bei Tastendruck wenn in Fahrzeug. [Command("buyv")] public void BuyShopVehicle(Client player) @@ -1287,6 +1289,7 @@ namespace reallife_gamemode.Server.Commands } } } + //TODO Als Browser anzeigeN?? [Command("gotolist")] public void CmdAdminGotoList(Client player) @@ -1306,6 +1309,7 @@ namespace reallife_gamemode.Server.Commands } player.SendChatMessage(gotoString); } + [Command("mark")] public void CmdAdminMark(Client player) { @@ -1317,6 +1321,7 @@ namespace reallife_gamemode.Server.Commands player.SetData("mark", player.Position); player.SendNotification("~y~Mark ~s~gespeichert", true); } + [Command("gotomark")] public void CmdAdminGotoMark(Client player) { @@ -1325,8 +1330,16 @@ namespace reallife_gamemode.Server.Commands ChatService.NotAuthorized(player); return; } + + if(!player.HasData("mark")) + { + player.SendChatMessage("~r~[FEHLER]~s~ Du hast noch keine Markierung gesetzt. ~m~(/mark)"); + return; + } + player.Position = player.GetData("mark"); } + [Command("saveall")] public void SaveAll(Client player) {