diff --git a/SelectiveBhop/scripting/SelectiveBhop.sp b/SelectiveBhop/scripting/SelectiveBhop.sp index 9e26887e..15e96578 100644 --- a/SelectiveBhop/scripting/SelectiveBhop.sp +++ b/SelectiveBhop/scripting/SelectiveBhop.sp @@ -57,6 +57,8 @@ public void OnPluginStart() RegAdminCmd("sm_bhop", Command_Bhop, ADMFLAG_GENERIC, "sm_bhop <#userid|name> <0|1>"); + RegConsoleCmd("sm_bhopstatus", Command_Status, "sm_bhopstatus [#userid|name]"); + /* Late load */ for(int i = 1; i <= MaxClients; i++) { @@ -330,6 +332,43 @@ public Action Command_Bhop(int client, int argc) return Plugin_Handled; } +public Action Command_Status(int client, int argc) +{ + if (argc && CheckCommandAccess(client, "", ADMFLAG_BAN, true)) + { + char sArgument[64]; + GetCmdArg(1, sArgument, sizeof(sArgument)); + + int target = -1; + if((target = FindTarget(client, sArgument, true, false)) == -1) + return Plugin_Handled; + + if(IsBhopLimited(target)) + { + ReplyToCommand(client, "[SM] %N their bhop is currently: limited", target); + return Plugin_Handled; + } + else + { + ReplyToCommand(client, "[SM] %N their bhop is currently: unlimited", target); + return Plugin_Handled; + } + } + else + { + if(IsBhopLimited(client)) + { + ReplyToCommand(client, "[SM] your bhop is currently: limited"); + return Plugin_Handled; + } + else + { + ReplyToCommand(client, "[SM] your bhop is currently: unlimited"); + return Plugin_Handled; + } + } +} + public int Native_LimitBhop(Handle plugin, int numParams) { int client = GetNativeCell(1);