Recoded sayhooks, now uses SM's silent/public chat triggers.

Began making set functions for the commands that will use them later.
Removed all sayhook cvars.
This commit is contained in:
Greyscale
2009-06-17 14:32:46 -07:00
parent 95c217aad6
commit 681ad45365
18 changed files with 376 additions and 231 deletions

View File

@ -27,6 +27,9 @@
ClassOnCommandsCreate()
{
// Register ZClass command.
RegConsoleCmd(SAYHOOKS_KEYWORD_ZCLASS, ZClassCommand, "Opens class selection menu.");
// Create base class commands.
RegConsoleCmd("zr_class_dump", ClassDumpCommand, "Dumps class data at a specified index in the specified cache. Usage: zr_class_dump <cachetype> <index|targetname>");
RegAdminCmd("zr_class_modify", ClassModifyCommand, ADMFLAG_GENERIC, "Modify class data on one or more classes. Usage: zr_class_modify <classname|\"zombies\"|\"humans\"|\"admins\"> <attribute> <value> [is_multiplier]");
@ -41,6 +44,29 @@ ClassOnCommandsHook()
ClassOverlayOnCommandsHook();
}
/**
* Command callback (zclass)
* Opens class selection menu.
*
* @param client The client index.
* @param argc Argument count.
*/
public Action:ZClassCommand(client, argc)
{
// If client is console, then stop and tell them this feature is for players only.
if (ZRIsConsole(client))
{
TranslationPrintToServer("Must be player");
return Plugin_Handled;
}
// Send class menu.
ClassMenuMain(client);
// This stops the "Unknown command" message in client's console.
return Plugin_Handled;
}
/**
* Command callback. (zr_class_dump)
* Dumps class data at a specified index in the specified cache.