Skip to content

Commit

Permalink
More fixes with some commands
Browse files Browse the repository at this point in the history
  • Loading branch information
UserR00T committed May 6, 2018
1 parent 7d86ef4 commit c603ad4
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions source/BP-Essentials/Chat/Commands/Admin/ExecuteOnPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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, $"<color={infoColor}>Banned</color> <color={argColor}>" + shPlayer.username + $"</color><color={infoColor}>.</color>");
}
else if (message.Contains(CmdKick))
{
player.SvKick(shPlayer.ID);
player.svManager.Kick(shPlayer.svPlayer.connection);
player.SendToSelf(Channel.Unsequenced, 10, $"<color={infoColor}>Kicked</color> <color={argColor}>" + shPlayer.username + $"</color><color={infoColor}>.</color>");
}
else if (message.Contains(CmdArrest))
{
player.SvArrest(shPlayer.ID);
shPlayer.svPlayer.Arrest();
player.SendToSelf(Channel.Unsequenced, 10, $"<color={infoColor}>Arrested</color> <color={argColor}>" + shPlayer.username + $"</color><color={infoColor}>.</color>");
}
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, $"<color={infoColor}>Restrained</color> <color={argColor}>" + shPlayer.username + $"</color><color={infoColor}>.</color>");
}
else if (message.Contains(CmdKill))
Expand Down

0 comments on commit c603ad4

Please sign in to comment.