From b6fbecab7cc92f65d667241a2bbb3e002f2d659b Mon Sep 17 00:00:00 2001 From: hydrant Date: Fri, 12 Oct 2018 21:36:36 +0200 Subject: [PATCH] Added Admin Speed Command (not implemented rn) --- Server/Commands/Admin.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Server/Commands/Admin.cs b/Server/Commands/Admin.cs index 25a3005f..0f598845 100644 --- a/Server/Commands/Admin.cs +++ b/Server/Commands/Admin.cs @@ -1074,6 +1074,24 @@ namespace reallife_gamemode.Server.Commands player.SendChatMessage("IP von " + NAPI.Player.GetPlayerName(target) + ": " + target.Address); } + [Command("aspeed", "~m~Benutzung: ~s~/aspeed [Modifier]")] + public void CmdAdminAspeed(Client player, float modifier) + { + if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) + { + ChatService.NotAuthorized(player); + return; + } + + if (!player.IsInVehicle) + { + player.SendChatMessage("~r~[FEHLER]~s~ Du sitzt momentan nicht in einem Fahrzeug."); + return; + } + + player.Vehicle.EnginePowerMultiplier = modifier; + } + //TEST COMMAND [Command("myvehicles")] public void CmdAdminMyVehicles(Client player)