SelectiveBhop: Add a status command.
Fuck you dogan, let me game in peace. K tnx bye. (ノಠ益ಠ)ノ彡┻━┻
This commit is contained in:
parent
a592567ca7
commit
324b5c55ae
@ -57,6 +57,8 @@ public void OnPluginStart()
|
|||||||
|
|
||||||
RegAdminCmd("sm_bhop", Command_Bhop, ADMFLAG_GENERIC, "sm_bhop <#userid|name> <0|1>");
|
RegAdminCmd("sm_bhop", Command_Bhop, ADMFLAG_GENERIC, "sm_bhop <#userid|name> <0|1>");
|
||||||
|
|
||||||
|
RegConsoleCmd("sm_bhopstatus", Command_Status, "sm_bhopstatus [#userid|name]");
|
||||||
|
|
||||||
/* Late load */
|
/* Late load */
|
||||||
for(int i = 1; i <= MaxClients; i++)
|
for(int i = 1; i <= MaxClients; i++)
|
||||||
{
|
{
|
||||||
@ -330,6 +332,43 @@ public Action Command_Bhop(int client, int argc)
|
|||||||
return Plugin_Handled;
|
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)
|
public int Native_LimitBhop(Handle plugin, int numParams)
|
||||||
{
|
{
|
||||||
int client = GetNativeCell(1);
|
int client = GetNativeCell(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user