fix clothes

This commit is contained in:
hydrant
2020-03-09 21:37:24 +01:00
parent fad7d32bc6
commit 1499c03f1e

View File

@@ -982,7 +982,7 @@ namespace ReallifeGamemode.Server.Commands
} }
[Command("clothes", "~m~Benutzung: ~s~/clothes [Spieler] [Component ID] [Drawable] (Textur)")] [Command("clothes", "~m~Benutzung: ~s~/clothes [Spieler] [Component ID] [Drawable] (Textur)")]
public void CmdAdminClothes(Player player, string name, int component, int drawable, int texture = 0) public void CmdAdminClothes(Player player, string name = null, int? component = null, int? drawable = null, int texture = 0)
{ {
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN2) ?? true) if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN2) ?? true)
{ {
@@ -990,6 +990,12 @@ namespace ReallifeGamemode.Server.Commands
return; return;
} }
if(name == null || component == null || drawable == null)
{
player.SendChatMessage("~m~Benutzung: ~s~/clothes [Spieler] [Component ID] [Drawable] (Textur)");
return;
}
Player target = PlayerService.GetPlayerByNameOrId(name); Player target = PlayerService.GetPlayerByNameOrId(name);
if (target == null || !target.IsLoggedIn()) if (target == null || !target.IsLoggedIn())
{ {