add typo handler for 1r -> !r and 1b -> !b

This commit is contained in:
rtldg 2022-08-15 10:32:16 +00:00
parent 0ffdbb9b5a
commit bdea503697
No known key found for this signature in database
GPG Key ID: E7CB3193D37A49DA

View File

@ -1601,9 +1601,23 @@ public Action OnClientSayCommand(int client, const char[] command, const char[]
} }
} }
if (StrEqual(sArgs, "1r") || StrEqual(sArgs, "1b"))
{
if (gCV_HideChatCommands.BoolValue)
return Plugin_Handled; // block chat but still do _Post
}
return Plugin_Continue; return Plugin_Continue;
} }
public void OnClientSayCommand_Post(int client, const char[] command, const char[] sArgs)
{
if (StrEqual(sArgs, "1r") || StrEqual(sArgs, "1b"))
{
FakeClientCommandEx(client, "sm_%c", sArgs[1]);
}
}
public Action Command_Hide(int client, int args) public Action Command_Hide(int client, int args)
{ {
if(!IsValidClient(client)) if(!IsValidClient(client))