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

@ -81,9 +81,6 @@ EventHook(bool:unhook = false)
*/
public Action:EventRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
// Print round objective to all clients.
TranslationPrintToChatAll(true, false, "General round objective");
// Forward event to sub-modules.
OverlaysOnRoundStart();
RoundStartOnRoundStart();
@ -196,7 +193,15 @@ public Action:EventPlayerSpawn(Handle:event, const String:name[], bool:dontBroad
ZHPOnClientSpawn(index);
VolOnPlayerSpawn(index);
TranslationPrintToChat(index, "General zmenu reminder");
// Get public chat trigger prefix.
decl String:publictrigger[4];
SayHooksGetPublicChatTrigger(publictrigger, sizeof(publictrigger));
// If public chat trigger is disabled, then don't print message.
if (!StrEqual(publictrigger, "N/A", false))
{
TranslationPrintToChat(index, "General zmenu reminder", publictrigger, SAYHOOKS_KEYWORD_ZMENU);
}
// Fire post player_spawn event.
CreateTimer(0.0, EventPlayerSpawnPost, index);