Added /vmod Command (Mod Vehicles by command)

This commit is contained in:
Lennart Kampshoff
2018-10-15 00:24:36 +02:00
parent 88055f8ab4
commit 679a72902f

View File

@@ -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)
{