From 49de529514604eafa5184574866279207c600bcd Mon Sep 17 00:00:00 2001 From: Lennart Kampshoff Date: Fri, 12 Oct 2018 21:36:36 +0200 Subject: [PATCH 1/5] 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) From a626b74f6444d2375742ef0ef0bed1315346b5e9 Mon Sep 17 00:00:00 2001 From: Lennart Kampshoff Date: Sun, 14 Oct 2018 23:04:08 +0200 Subject: [PATCH 2/5] Added Clothes and Player Props --- Server/Commands/Admin.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Server/Commands/Admin.cs b/Server/Commands/Admin.cs index afe578e6..de21c9de 100644 --- a/Server/Commands/Admin.cs +++ b/Server/Commands/Admin.cs @@ -24,6 +24,30 @@ namespace reallife_gamemode.Server.Commands { public class Admin : Script { + [Command("clothes", "~m~Benutzung: ~s~/clothes [Slot] [Component ID]")] + public void CmdAdminClothes(Client player, int slot, int component) + { + if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) + { + ChatService.NotAuthorized(player); + return; + } + + player.SetClothes(slot, component, 0); + } + + [Command("props", "~m~Benutzung: ~s~/props [Slot] [Component ID]")] + public void CmdAdminProps(Client player, int slot, int component) + { + if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) + { + ChatService.NotAuthorized(player); + return; + } + + player.SetAccessories(slot, component, 0); + } + [Command("o", "~m~Benutzung: ~s~/o [Nachricht]", GreedyArg = true)] public void CmdAdminO(Client player, string message) { From 493c158d02d34014e1a8793f4f059e129abf9fa3 Mon Sep 17 00:00:00 2001 From: Lennart Kampshoff Date: Sun, 14 Oct 2018 23:58:07 +0200 Subject: [PATCH 3/5] Fixed /a and /aw --- Server/Commands/Admin.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Server/Commands/Admin.cs b/Server/Commands/Admin.cs index de21c9de..7af044f8 100644 --- a/Server/Commands/Admin.cs +++ b/Server/Commands/Admin.cs @@ -348,7 +348,7 @@ namespace reallife_gamemode.Server.Commands player.SendChatMessage("Farb-ID1 " + color1 + ", Farb-ID2 " + color2 + ""); } - [Command("aw", "~m~Benutzung: ~s~/aw [Spieler] [Nachricht]")] + [Command("aw", "~m~Benutzung: ~s~/aw [Spieler] [Nachricht]", GreedyArg = true)] public void CmdAdminMsg(Client player, string name, string msg) { if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) @@ -782,7 +782,7 @@ namespace reallife_gamemode.Server.Commands else player.SendChatMessage("~m~Du sitzt in keinem Fahrzeug!"); } - [Command("a", "~m~Benutzung: ~s~/a [Nachricht]")] + [Command("a", "~m~Benutzung: ~s~/a [Nachricht]", GreedyArg = true)] public void CmdAdminA(Client player, string message) { if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) From 88055f8ab4715ea7e36f1c059eb0eff1f694c1e0 Mon Sep 17 00:00:00 2001 From: Lennart Kampshoff Date: Mon, 15 Oct 2018 00:04:09 +0200 Subject: [PATCH 4/5] Added optional texture parameter to /clothes and /props --- Server/Commands/Admin.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Server/Commands/Admin.cs b/Server/Commands/Admin.cs index 7af044f8..3d0049fa 100644 --- a/Server/Commands/Admin.cs +++ b/Server/Commands/Admin.cs @@ -24,8 +24,8 @@ namespace reallife_gamemode.Server.Commands { public class Admin : Script { - [Command("clothes", "~m~Benutzung: ~s~/clothes [Slot] [Component ID]")] - public void CmdAdminClothes(Client player, int slot, int component) + [Command("clothes", "~m~Benutzung: ~s~/clothes [Slot] [Component ID] (Textur)")] + public void CmdAdminClothes(Client player, int slot, int component, int texture = 0) { if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) { @@ -33,11 +33,11 @@ namespace reallife_gamemode.Server.Commands return; } - player.SetClothes(slot, component, 0); + player.SetClothes(slot, component, texture); } - [Command("props", "~m~Benutzung: ~s~/props [Slot] [Component ID]")] - public void CmdAdminProps(Client player, int slot, int component) + [Command("props", "~m~Benutzung: ~s~/props [Slot] [Component ID] (Textur)")] + public void CmdAdminProps(Client player, int slot, int component, int texture = 0) { if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) { @@ -45,7 +45,7 @@ namespace reallife_gamemode.Server.Commands return; } - player.SetAccessories(slot, component, 0); + player.SetAccessories(slot, component, texture); } [Command("o", "~m~Benutzung: ~s~/o [Nachricht]", GreedyArg = true)] From 679a72902f534156d1cef4bfabac24b6741b17bc Mon Sep 17 00:00:00 2001 From: Lennart Kampshoff Date: Mon, 15 Oct 2018 00:24:36 +0200 Subject: [PATCH 5/5] 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) {