From ba6e45074d80ade8ed331f77448dd1b948861ea5 Mon Sep 17 00:00:00 2001 From: hydrant Date: Mon, 15 Oct 2018 00:24:36 +0200 Subject: [PATCH] Added /vmod Command (Mod Vehicles by command) --- Server/Commands/Admin.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Server/Commands/Admin.cs b/Server/Commands/Admin.cs index 3d0049fa..7d2528bc 100644 --- a/Server/Commands/Admin.cs +++ b/Server/Commands/Admin.cs @@ -24,6 +24,25 @@ namespace reallife_gamemode.Server.Commands { public class Admin : Script { + [Command("vmod", "~m~Benutzung: ~s~/vmod [Slot] [Mod ID]")] + public void CmdAdminVmod(Client player, int slot, int mod) + { + if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) + { + ChatService.NotAuthorized(player); + return; + } + + if (!player.IsInVehicle) + { + player.SendChatMessage("~r~[FEHLER]~s~ Du sitzt momentan nicht in einem Fahrzeug."); + return; + } + + if (mod == -1) player.Vehicle.RemoveMod(slot); + else player.Vehicle.SetMod(slot, mod); + } + [Command("clothes", "~m~Benutzung: ~s~/clothes [Slot] [Component ID] (Textur)")] public void CmdAdminClothes(Client player, int slot, int component, int texture = 0) {