Initial commit
This commit is contained in:
100
scripting/include/scp.inc
Normal file
100
scripting/include/scp.inc
Normal file
@@ -0,0 +1,100 @@
|
||||
/************************************************************************
|
||||
*************************************************************************
|
||||
Simple Plugins
|
||||
Description:
|
||||
Included file for Simple Chat Processor in the Simple Plugins project
|
||||
*************************************************************************
|
||||
*************************************************************************
|
||||
This file is part of Simple Plugins project.
|
||||
|
||||
This plugin is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the License, or
|
||||
later version.
|
||||
|
||||
This plugin is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this plugin. If not, see <http://www.gnu.org/licenses/>.
|
||||
*************************************************************************
|
||||
*************************************************************************
|
||||
File Information
|
||||
$Id: scp.inc 175 2011-09-07 00:42:17Z antithasys $
|
||||
$Author: antithasys $
|
||||
$Revision: 175 $
|
||||
$Date: 2011-09-06 19:42:17 -0500 (Tue, 06 Sep 2011) $
|
||||
$LastChangedBy: antithasys $
|
||||
$LastChangedDate: 2011-09-06 19:42:17 -0500 (Tue, 06 Sep 2011) $
|
||||
$URL: https://sm-simple-plugins.googlecode.com/svn/trunk/Simple%20Chat%20Processor/addons/sourcemod/scripting/include/scp.inc $
|
||||
$Copyright: (c) Simple Plugins 2008-2009$
|
||||
*************************************************************************
|
||||
*************************************************************************/
|
||||
|
||||
#if defined _scp_included
|
||||
#endinput
|
||||
#endif
|
||||
#define _scp_included
|
||||
|
||||
#define MAXLENGTH_INPUT 128 // Inclues \0 and is the size of the chat input box.
|
||||
#define MAXLENGTH_NAME 64 // This is backwords math to get compability. Sourcemod has it set at 32, but there is room for more.
|
||||
#define MAXLENGTH_MESSAGE 256 // This is based upon the SDK and the length of the entire message, including tags, name, : etc.
|
||||
|
||||
#define CHATFLAGS_INVALID 0
|
||||
#define CHATFLAGS_ALL (1<<0)
|
||||
#define CHATFLAGS_TEAM (1<<1)
|
||||
#define CHATFLAGS_SPEC (1<<2)
|
||||
#define CHATFLAGS_DEAD (1<<3)
|
||||
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* When a player types a chat message
|
||||
*
|
||||
* NOTES:
|
||||
* Use MAXLENGTH_ constants above for formating the strings
|
||||
* Do not rely on the recipients handle to exist beyond the forward
|
||||
* Do not start another usermessage (PrintToChat) within this forward
|
||||
*
|
||||
* @param author The client index of the player who sent the chat message (Byref)
|
||||
* @param recipients The handle to the client index adt array of the players who should recieve the chat message
|
||||
* @param name The client's name of the player who sent the chat message (Byref)
|
||||
* @param message The contents of the chat message (Byref)
|
||||
* @noreturn
|
||||
**********************************************************************/
|
||||
forward Action:OnChatMessage(&author, Handle:recipients, String:name[], String:message[]);
|
||||
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Gets the current flags for the chat message
|
||||
* Should only be called within OnChatMessage()
|
||||
*
|
||||
* @return The current type of chat message (see constants)
|
||||
**********************************************************************/
|
||||
native GetMessageFlags();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Shared plugin information
|
||||
**/
|
||||
public SharedPlugin:_pl_scp =
|
||||
{
|
||||
name = "scp",
|
||||
file = "simple-chatprocessor.smx",
|
||||
#if defined REQUIRE_PLUGIN
|
||||
required = 1
|
||||
#else
|
||||
required = 0
|
||||
#endif
|
||||
};
|
||||
|
||||
#if !defined REQUIRE_PLUGIN
|
||||
public _pl_scp_SetNTVOptional()
|
||||
{
|
||||
MarkNativeAsOptional("GetMessageFlags");
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user