the "No Access" phrase now replies correctly from chat triggers
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40901
This commit is contained in:
parent
c094ea1b22
commit
1eb1072687
@ -18,6 +18,8 @@
|
||||
#include "sm_stringutil.h"
|
||||
#include "PlayerManager.h"
|
||||
#include "Translator.h"
|
||||
#include "HalfLife2.h"
|
||||
#include "ChatTriggers.h"
|
||||
|
||||
ConCmdManager g_ConCmds;
|
||||
|
||||
@ -448,10 +450,17 @@ bool ConCmdManager::CheckAccess(int client, const char *cmd, AdminCmdInfo *pAdmi
|
||||
snprintf(buffer, sizeof(buffer), "You do not have access to this command");
|
||||
}
|
||||
|
||||
char fullbuffer[192];
|
||||
snprintf(fullbuffer, sizeof(fullbuffer), "[SM] %s.\n", buffer);
|
||||
|
||||
engine->ClientPrintf(player->GetEdict(), fullbuffer);
|
||||
unsigned int replyto = g_ChatTriggers.GetReplyTo();
|
||||
if (replyto == SM_REPLY_CONSOLE)
|
||||
{
|
||||
char fullbuffer[192];
|
||||
snprintf(fullbuffer, sizeof(fullbuffer), "[SM] %s.\n", buffer);
|
||||
engine->ClientPrintf(player->GetEdict(), fullbuffer);
|
||||
} else if (replyto == SM_REPLY_CHAT) {
|
||||
char fullbuffer[192];
|
||||
snprintf(fullbuffer, sizeof(fullbuffer), "[SM] %s.", buffer);
|
||||
g_HL2.TextMsg(client, HUD_PRINTTALK, fullbuffer);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -26,6 +26,9 @@
|
||||
|
||||
using namespace SourceHook;
|
||||
|
||||
#define HUD_PRINTTALK 3
|
||||
#define HUD_PRINTCENTER 4
|
||||
|
||||
struct DataTableInfo
|
||||
{
|
||||
ServerClass *sc;
|
||||
|
@ -29,8 +29,6 @@ enum ConVarBounds
|
||||
ConVarBound_Lower
|
||||
};
|
||||
|
||||
#define HUD_PRINTTALK 3
|
||||
|
||||
static cell_t sm_CreateConVar(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
char *name, *defaultVal, *helpText;
|
||||
|
@ -19,9 +19,6 @@
|
||||
#include "PlayerManager.h"
|
||||
#include "HalfLife2.h"
|
||||
|
||||
#define HUD_PRINTTALK 3
|
||||
#define HUD_PRINTCENTER 4
|
||||
|
||||
IServerPluginCallbacks *g_VSP = NULL;
|
||||
|
||||
class HalfLifeNatives : public SMGlobalClass
|
||||
|
Loading…
Reference in New Issue
Block a user