Further suggestions. I always wonder why people hook the say command when all they want is the chat trigger. Sourcemod does all this for you. Creating your own console command is the way to go.
Replace:
PHP Code:
RegConsoleCmd("say", Command_SayChat);
public Action:Command_SayChat(client, args)
{
decl String:text[192];
if (!GetConVarBool(cvPluginEnabled) ||
IsChatTrigger() ||
GetCmdArgString(text, sizeof(text)) < 1)
return Plugin_Continue;
ReplaceString(text, sizeof(text), "\"", "");
ReplaceString(text, sizeof(text), " ", "");
if (StrEqual(text, "!achievements"))
{
DisplayAchievements(client);
return Plugin_Handled;
}
return Plugin_Continue;
}
With:
PHP Code:
RegConsoleCmd("sm_achievements", Command_DisplayAchievements, "Display Achievements");
public Action:Command_DisplayAchievements(client, args)
{
if (GetConVarBool(cvPluginEnabled))
DisplayAchievements(client);
return Plugin_Handled;
}
__________________