diff --git a/entWatch/scripting/entWatch.sp b/entWatch/scripting/entWatch.sp index b49bed72..8a297e4f 100644 --- a/entWatch/scripting/entWatch.sp +++ b/entWatch/scripting/entWatch.sp @@ -1738,12 +1738,25 @@ public Action:Command_Restrict(client, args) return Plugin_Handled; } - new String:target_argument[64]; - GetCmdArg(1, target_argument, sizeof(target_argument)); + char sArgs[64]; + char sTargetName[MAX_TARGET_LENGTH]; + int iTargets[MAXPLAYERS]; + int iTargetCount; + bool bIsML; - new target = -1; - if ((target = FindTarget(client, target_argument, true)) == -1) + GetCmdArg(1, sArgs, sizeof(sArgs)); + + if ((iTargetCount = ProcessTargetString( + sArgs, + client, + iTargets, + MAXPLAYERS, + COMMAND_FILTER_NO_BOTS, + sTargetName, + sizeof(sTargetName), + bIsML)) <= 0) { + ReplyToTargetError(client, iTargetCount); return Plugin_Handled; } @@ -1757,19 +1770,19 @@ public Action:Command_Restrict(client, args) if (StringToInt(sLen) == 0) { - EBanClient(target, "1", client); + EBanClient(iTargets[0], "1", client); return Plugin_Handled; } else if (StringToInt(sLen) > 0) { - EBanClient(target, Flength, client); + EBanClient(iTargets[0], Flength, client); } return Plugin_Handled; } - EBanClient(target, "0", client); + EBanClient(iTargets[0], "0", client); return Plugin_Handled; }