From c603ad4a0d919b671fb0d196d9393ded896de73b Mon Sep 17 00:00:00 2001 From: UserR00T Date: Sun, 6 May 2018 21:13:46 +0200 Subject: [PATCH] More fixes with some commands --- .../Chat/Commands/Admin/ExecuteOnPlayer.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/source/BP-Essentials/Chat/Commands/Admin/ExecuteOnPlayer.cs b/source/BP-Essentials/Chat/Commands/Admin/ExecuteOnPlayer.cs index b3889370..8ff920cc 100644 --- a/source/BP-Essentials/Chat/Commands/Admin/ExecuteOnPlayer.cs +++ b/source/BP-Essentials/Chat/Commands/Admin/ExecuteOnPlayer.cs @@ -53,23 +53,26 @@ public static bool Run(object oPlayer, string message, string arg1) } else if (message.Contains(CmdBan)) { - player.SvBan(shPlayer.ID); + player.svManager.AddBanned(shPlayer); + player.svManager.Disconnect(shPlayer.svPlayer.connection); player.SendToSelf(Channel.Unsequenced, 10, $"Banned " + shPlayer.username + $"."); } else if (message.Contains(CmdKick)) { - player.SvKick(shPlayer.ID); + player.svManager.Kick(shPlayer.svPlayer.connection); player.SendToSelf(Channel.Unsequenced, 10, $"Kicked " + shPlayer.username + $"."); } else if (message.Contains(CmdArrest)) { - player.SvArrest(shPlayer.ID); + shPlayer.svPlayer.Arrest(); player.SendToSelf(Channel.Unsequenced, 10, $"Arrested " + shPlayer.username + $"."); } else if (message.Contains(CmdRestrain)) { - player.SvArrest(shPlayer.ID); - player.SvRestrain(shPlayer.ID); + shPlayer.svPlayer.Arrest(); + shPlayer.svPlayer.SvSetEquipable(shPlayer.manager.restrained.index); + if (!shPlayer.svPlayer.IsServerside()) + shPlayer.svPlayer.SendToSelf(Channel.Unsequenced, 10, "You've been restrained"); player.SendToSelf(Channel.Unsequenced, 10, $"Restrained " + shPlayer.username + $"."); } else if (message.Contains(CmdKill))