mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2024-12-10 22:24:12 +01:00
ebca331ae4
Added ClientConPrintf to API for printing text in a client's console. Same as IVEngineServer::ClientPrintf except that it allows string formatting. Updated changelog for possible future version. Version bumpage. Feel free to kill me for doing a change of this almost massive scale :-\ At least none of this breaks plugins though. --HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40193
54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
/* ======== SourceMM ========
|
|
* Copyright (C) 2004-2006 Metamod:Source Development Team
|
|
* No warranties of any kind
|
|
*
|
|
* License: zlib/libpng
|
|
*
|
|
* Author(s): David "BAILOPAN" Anderson
|
|
* ============================
|
|
*/
|
|
|
|
#ifndef _INCLUDE_CONCOMMANDS_H
|
|
#define _INCLUDE_CONCOMMANDS_H
|
|
|
|
/**
|
|
* @brief Header for console commands
|
|
* @file concommands.h
|
|
*/
|
|
|
|
#include <interface.h>
|
|
#include <eiface.h>
|
|
#include "sourcemm.h"
|
|
#include <convar.h>
|
|
#include "sh_list.h"
|
|
|
|
class SMConVarAccessor : public IConCommandBaseAccessor
|
|
{
|
|
SourceHook::List<ConCommandBase*> m_RegisteredCommands;
|
|
public:
|
|
virtual bool RegisterConCommandBase(ConCommandBase *pCommand);
|
|
bool Register(ConCommandBase *pCommand);
|
|
void MarkCommandsAsGameDLL();
|
|
void Unregister(ConCommandBase *pCommand);
|
|
void UnregisterGameDLLCommands();
|
|
};
|
|
|
|
class CAlwaysRegisterableCommand : public ConCommandBase
|
|
{
|
|
ICvar *m_pICvar;
|
|
public:
|
|
CAlwaysRegisterableCommand();
|
|
bool IsRegistered( void ) const;
|
|
// If already registered, removes us
|
|
// Then it registers us again
|
|
void BringToFront();
|
|
};
|
|
|
|
void ClientCommand_handler(edict_t *client);
|
|
|
|
const char *GetPluginsFile();
|
|
|
|
extern SMConVarAccessor g_SMConVarAccessor;
|
|
|
|
#endif //_INCLUDE_CONCOMMANDS_H
|