Added optional texture parameter to /clothes and /props

This commit is contained in:
Lennart Kampshoff
2018-10-15 00:04:09 +02:00
parent 493c158d02
commit 88055f8ab4

View File

@@ -24,8 +24,8 @@ namespace reallife_gamemode.Server.Commands
{ {
public class Admin : Script public class Admin : Script
{ {
[Command("clothes", "~m~Benutzung: ~s~/clothes [Slot] [Component ID]")] [Command("clothes", "~m~Benutzung: ~s~/clothes [Slot] [Component ID] (Textur)")]
public void CmdAdminClothes(Client player, int slot, int component) public void CmdAdminClothes(Client player, int slot, int component, int texture = 0)
{ {
if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)
{ {
@@ -33,11 +33,11 @@ namespace reallife_gamemode.Server.Commands
return; return;
} }
player.SetClothes(slot, component, 0); player.SetClothes(slot, component, texture);
} }
[Command("props", "~m~Benutzung: ~s~/props [Slot] [Component ID]")] [Command("props", "~m~Benutzung: ~s~/props [Slot] [Component ID] (Textur)")]
public void CmdAdminProps(Client player, int slot, int component) public void CmdAdminProps(Client player, int slot, int component, int texture = 0)
{ {
if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true)
{ {
@@ -45,7 +45,7 @@ namespace reallife_gamemode.Server.Commands
return; return;
} }
player.SetAccessories(slot, component, 0); player.SetAccessories(slot, component, texture);
} }
[Command("o", "~m~Benutzung: ~s~/o [Nachricht]", GreedyArg = true)] [Command("o", "~m~Benutzung: ~s~/o [Nachricht]", GreedyArg = true)]