Removed the chat trigger detection, it causes a shit ton of errors in console. And updated compilers.
This commit is contained in:
parent
11ef05f995
commit
5c3a6b16cc
2
Makefile
2
Makefile
@ -3,7 +3,7 @@
|
|||||||
SOURCEDIR=src
|
SOURCEDIR=src
|
||||||
SMINCLUDES=env/include
|
SMINCLUDES=env/include
|
||||||
BUILDDIR=build
|
BUILDDIR=build
|
||||||
SPCOMP=env/linux/bin/spcomp-1.3.4
|
SPCOMP=env/linux/bin/spcomp-1.4.0-3218
|
||||||
VERSIONDUMP=./updateversion.sh
|
VERSIONDUMP=./updateversion.sh
|
||||||
|
|
||||||
vpath %.sp $(SOURCEDIR)
|
vpath %.sp $(SOURCEDIR)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
set SOURCEDIR=src
|
set SOURCEDIR=src
|
||||||
set SMINCLUDES=env\include
|
set SMINCLUDES=env\include
|
||||||
set BUILDDIR=build
|
set BUILDDIR=build
|
||||||
set SPCOMP=env\win32\bin\spcomp-1.3.4.exe
|
set SPCOMP=env\win32\bin\spcomp-1.4.0-3218.exe
|
||||||
set VERSIONDUMP=updateversion.bat
|
set VERSIONDUMP=updateversion.bat
|
||||||
|
|
||||||
:: Dump version and revision information first.
|
:: Dump version and revision information first.
|
||||||
|
BIN
env/linux/bin/spcomp-1.3.4
vendored
BIN
env/linux/bin/spcomp-1.3.4
vendored
Binary file not shown.
BIN
env/linux/bin/spcomp-1.4.0-3218
vendored
Normal file
BIN
env/linux/bin/spcomp-1.4.0-3218
vendored
Normal file
Binary file not shown.
BIN
env/win32/bin/spcomp-1.3.4.exe
vendored
BIN
env/win32/bin/spcomp-1.3.4.exe
vendored
Binary file not shown.
BIN
env/win32/bin/spcomp-1.4.0-3218.exe
vendored
Normal file
BIN
env/win32/bin/spcomp-1.4.0-3218.exe
vendored
Normal file
Binary file not shown.
@ -80,13 +80,6 @@ ZMenuMain(client)
|
|||||||
// Create menu handle.
|
// Create menu handle.
|
||||||
new Handle:menu_main = CreateMenu(ZMenuMainHandle);
|
new Handle:menu_main = CreateMenu(ZMenuMainHandle);
|
||||||
|
|
||||||
decl String:publictrigger[4];
|
|
||||||
decl String:silenttrigger[4];
|
|
||||||
|
|
||||||
// Get public/silent chat triggers.
|
|
||||||
SayHooksGetPublicChatTrigger(publictrigger, sizeof(publictrigger));
|
|
||||||
SayHooksGetSilentChatTrigger(silenttrigger, sizeof(silenttrigger));
|
|
||||||
|
|
||||||
SetGlobalTransTarget(client);
|
SetGlobalTransTarget(client);
|
||||||
|
|
||||||
// Initialize menu lines.
|
// Initialize menu lines.
|
||||||
@ -100,7 +93,7 @@ ZMenuMain(client)
|
|||||||
decl String:zmarket[MENU_LINE_HUGE_LENGTH];
|
decl String:zmarket[MENU_LINE_HUGE_LENGTH];
|
||||||
|
|
||||||
// Translate each line into client's language.
|
// Translate each line into client's language.
|
||||||
Format(title, sizeof(title), "%t\n ", "Menu main title", publictrigger, silenttrigger);
|
Format(title, sizeof(title), "%t\n ", "Menu main title", SAYHOOKS_CHAT_PUBLIC_DEFAULT, SAYHOOKS_CHAT_SILENT_DEFAULT);
|
||||||
Format(zadmin, sizeof(zadmin), "%t", "Menu main zadmin");
|
Format(zadmin, sizeof(zadmin), "%t", "Menu main zadmin");
|
||||||
Format(zclass, sizeof(zclass), "%t", "Menu main zclass");
|
Format(zclass, sizeof(zclass), "%t", "Menu main zclass");
|
||||||
Format(zcookies, sizeof(zcookies), "%t", "Menu main zcookies");
|
Format(zcookies, sizeof(zcookies), "%t", "Menu main zcookies");
|
||||||
|
@ -43,18 +43,8 @@ RoundStartOnClientSpawn(client)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Print to client, how to access ZMenu.
|
// Print to client, how to access ZMenu.
|
||||||
TranslationPrintToChat(client, "General zmenu reminder", publictrigger, SAYHOOKS_KEYWORD_ZMENU);
|
TranslationPrintToChat(client, "General zmenu reminder", SAYHOOKS_CHAT_PUBLIC_DEFAULT, SAYHOOKS_KEYWORD_ZMENU);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,8 +28,6 @@
|
|||||||
/**
|
/**
|
||||||
* @section SM core config info.
|
* @section SM core config info.
|
||||||
*/
|
*/
|
||||||
#define SAYHOOKS_CORE_KVNAME "Core"
|
|
||||||
#define SAYHOOKS_CORE_KVPATH "configs/core.cfg"
|
|
||||||
#define SAYHOOKS_CHAT_PUBLIC_DEFAULT "!"
|
#define SAYHOOKS_CHAT_PUBLIC_DEFAULT "!"
|
||||||
#define SAYHOOKS_CHAT_SILENT_DEFAULT "/"
|
#define SAYHOOKS_CHAT_SILENT_DEFAULT "/"
|
||||||
/**
|
/**
|
||||||
@ -55,89 +53,3 @@
|
|||||||
/**
|
/**
|
||||||
* @endsection
|
* @endsection
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* Hack function to get the public chat trigger value.
|
|
||||||
*
|
|
||||||
* @param trigger The string to store value in.
|
|
||||||
* @param maxlen The maximum length of the string.
|
|
||||||
*/
|
|
||||||
SayHooksGetPublicChatTrigger(String:trigger[], maxlen)
|
|
||||||
{
|
|
||||||
// Create kv handle.
|
|
||||||
new Handle:kvCore = CreateKeyValues(SAYHOOKS_CORE_KVNAME);
|
|
||||||
|
|
||||||
// Build path to file.
|
|
||||||
decl String:filepath[PLATFORM_MAX_PATH];
|
|
||||||
BuildPath(Path_SM, filepath, PLATFORM_MAX_PATH, SAYHOOKS_CORE_KVPATH);
|
|
||||||
|
|
||||||
// Load kv into memory.
|
|
||||||
new bool:success = FileToKeyValues(kvCore, filepath);
|
|
||||||
|
|
||||||
// If the file couldn't be loaded, then return the default value.
|
|
||||||
if (!success)
|
|
||||||
{
|
|
||||||
strcopy(trigger, maxlen, SAYHOOKS_CHAT_PUBLIC_DEFAULT);
|
|
||||||
|
|
||||||
// Close the handle.
|
|
||||||
CloseHandle(kvCore);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rewind and find value.
|
|
||||||
KvRewind(kvCore);
|
|
||||||
KvGetString(kvCore, "PublicChatTrigger", trigger, maxlen, SAYHOOKS_CHAT_PUBLIC_DEFAULT);
|
|
||||||
|
|
||||||
// If trigger is disabled, then display as "N/A".
|
|
||||||
if (!trigger[0])
|
|
||||||
{
|
|
||||||
strcopy(trigger, maxlen, "N/A");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close the handle.
|
|
||||||
CloseHandle(kvCore);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Hack function to get the silent chat trigger value.
|
|
||||||
*
|
|
||||||
* @param trigger The string to store value in.
|
|
||||||
* @param maxlen The maximum length of the string.
|
|
||||||
*/
|
|
||||||
SayHooksGetSilentChatTrigger(String:trigger[], maxlen)
|
|
||||||
{
|
|
||||||
// Create kv handle.
|
|
||||||
new Handle:kvCore = CreateKeyValues(SAYHOOKS_CORE_KVNAME);
|
|
||||||
|
|
||||||
// Build path to file.
|
|
||||||
decl String:filepath[PLATFORM_MAX_PATH];
|
|
||||||
BuildPath(Path_SM, filepath, PLATFORM_MAX_PATH, SAYHOOKS_CORE_KVPATH);
|
|
||||||
|
|
||||||
// Load kv into memory.
|
|
||||||
new bool:success = FileToKeyValues(kvCore, filepath);
|
|
||||||
|
|
||||||
// If the file couldn't be loaded, then return the default value.
|
|
||||||
if (!success)
|
|
||||||
{
|
|
||||||
strcopy(trigger, maxlen, SAYHOOKS_CHAT_SILENT_DEFAULT);
|
|
||||||
|
|
||||||
// Close the handle.
|
|
||||||
CloseHandle(kvCore);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rewind and find value.
|
|
||||||
KvRewind(kvCore);
|
|
||||||
KvGetString(kvCore, "SilentChatTrigger", trigger, maxlen, SAYHOOKS_CHAT_SILENT_DEFAULT);
|
|
||||||
|
|
||||||
// If trigger is disabled, then display as "N/A".
|
|
||||||
if (!trigger[0])
|
|
||||||
{
|
|
||||||
strcopy(trigger, maxlen, "N/A");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close the handle.
|
|
||||||
CloseHandle(kvCore);
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user