Raised This Month: $12 Target: $400
 3% 

Simple Chat Processor (Redux)


Post New Thread Reply   
 
Thread Tools Display Modes
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 10-21-2012 , 15:51   Re: Simple Chat Processor (Redux)
Reply With Quote #21

Quote:
Originally Posted by chrissiapfel View Post
you can do Phrases for HL2DM?

chris.
I don't play the game. Can you provide us with the phrases for HL2DM?
__________________
Need help? PM me or add me on Steam.
My Steam




Quote:
Originally Posted by Rp.KryptoNite View Post
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING
minimoney1 is offline
chrissiapfel
Junior Member
Join Date: Apr 2012
Old 10-21-2012 , 16:40   Re: Simple Chat Processor (Redux)
Reply With Quote #22

Quote:
Originally Posted by minimoney1 View Post
I don't play the game. Can you provide us with the phrases for HL2DM?
how can i find it ?
chrissiapfel is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 10-22-2012 , 10:23   Re: Simple Chat Processor (Redux)
Reply With Quote #23

I think this plugin (in some form) deserves to be added to SM core. What do you all think?
__________________
FaTony is offline
NameUser
Senior Member
Join Date: Apr 2012
Location: Bay Area, California
Old 10-22-2012 , 20:13   Re: Simple Chat Processor (Redux)
Reply With Quote #24

Quote:
Originally Posted by FaTony View Post
I think this plugin (in some form) deserves to be added to SM core. What do you all think?
I'd say yes.
__________________
NameUser is offline
Send a message via Skype™ to NameUser
wolf414
Member
Join Date: Aug 2005
Location: WI
Old 10-23-2012 , 05:37   Re: Simple Chat Processor (Redux)
Reply With Quote #25

I cannot get this to work for CSGO. Can anyone help?

PHP Code:
L 10/23/2012 04:35:43: [simple-chatprocessor.smxUnknown Game Foldercsgo
L 10
/23/2012 04:35:43: [simple-chatprocessor.smx] [SCPRecognized mod [Unknown]. 

Last edited by wolf414; 10-23-2012 at 05:37.
wolf414 is offline
Send a message via MSN to wolf414
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 10-23-2012 , 21:49   Re: Simple Chat Processor (Redux)
Reply With Quote #26

Beta version of SCP. This really doesn't give the server owner anything extra other than CSGO support (assuming it uses the same chat translation strings that CSS does).
But for developers, I have added a new private forward support, while still keeping the old global forward for backwards compatibility. This new private forward (with its native) is what's going to be updated and built upon from now on; the global forward will remain the same throughout all versions, however.
Here's the new include file:
PHP Code:
/************************************************************************
*************************************************************************
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$
$Author$
$Revision$
$Date$
$LastChangedBy$
$LastChangedDate$
$URL$
$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)
 *
 * @note           This version is only kept for backwards compatibility. Developers, use the native HookChatMessage.
 *
 * @return        Plugin_Changed or Plugin_Handled to proceed to change a modified value, Plugin_Stop to block the message and Plugin_Continue to go through with the message with no changes.
 *
 */
forward Action:OnChatMessage(&authorHandle:recipientsString:name[], String:message[]);



funcenum ChatMessageHook
{

    
/**
     *
     * 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 (By-ref)
     * @param         recipients                    The handle to the client index adt array of the players who should recieve the chat message (By-ref)
     * @param         name                        The client's name of the player who sent the chat message (By-ref)
     * @param         message                        The contents of the chat message (Byref)
     *
     * @note           This is considered  to be the 'newer' version of OnChatMessage. The old version will be kept for backwards compatibility.
     *
     * @return        Plugin_Changed to proceed to change a modified value, Plugin_Stop or Plugin_Handled to block the message and Plugin_Continue to go through with the message with no changes.
     *
     */
    
Action:public(&author, &Handle:recipientsString:name[], String:message[]),

};

/**
 *
 * Hooks when a client types a chat message.
 * 
 * @param            func                         The ChatMessageHook function that should be called.
 *
 * @return             True on success. False otherwise.
 *
 */

native bool:HookChatMessage(ChatMessageHook:func);

/**
 *
 * Removes a ChatMessageHook hook.
 * 
 * @param            func                         The ChatMessageHook function that should be removed.
 *
 * @return             True on success. False otherwise.
 *
 */

native bool:UnhookChatMessage(ChatMessageHook:func);


/**
 *
 * 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");
    
MarkNativeAsOptional("HookChatMessage");
    
MarkNativeAsOptional("UnhookChatMessage");
}
#endif 
Attached Files
File Type: inc scp.inc (5.1 KB, 566 views)
File Type: sp Get Plugin or Get Source (simple-chatprocessor.sp - 523 views - 17.2 KB)
File Type: smx simple-chatprocessor.smx (9.7 KB, 506 views)
__________________
Need help? PM me or add me on Steam.
My Steam




Quote:
Originally Posted by Rp.KryptoNite View Post
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING
minimoney1 is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 10-24-2012 , 03:20   Re: Simple Chat Processor (Redux)
Reply With Quote #27

Why funcenum if you have only 1 prototype?
__________________
FaTony is offline
wolf414
Member
Join Date: Aug 2005
Location: WI
Old 10-24-2012 , 05:38   Re: Simple Chat Processor (Redux)
Reply With Quote #28

Im still getting the errors

PHP Code:
L 10/24/2012 04:36:57: [simple-chatprocessor.smxUnknown Game Foldercsgo
L 10
/24/2012 04:36:57: [simple-chatprocessor.smx] [SCPRecognized mod [Unknown].
Simple Chat Processor (Redux): Error detected in plugin startup (see error logs)
L 10/24/2012 
wolf414 is offline
Send a message via MSN to wolf414
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 10-24-2012 , 07:08   Re: Simple Chat Processor (Redux)
Reply With Quote #29

Quote:
Originally Posted by FaTony View Post
Why funcenum if you have only 1 prototype?
I'll be adding more later on for different types of hooks.
Quote:
Originally Posted by wolf414 View Post
Im still getting the errors

PHP Code:
L 10/24/2012 04:36:57: [simple-chatprocessor.smxUnknown Game Foldercsgo
L 10
/24/2012 04:36:57: [simple-chatprocessor.smx] [SCPRecognized mod [Unknown].
Simple Chat Processor (Redux): Error detected in plugin startup (see error logs)
L 10/24/2012 
Make sure you have the correct version and also make sure that you make a file named scp.csgo.phrases.txt and copy the contents from scp.cstrike.phrases.txt (From the OP) and paste it onto there.
__________________
Need help? PM me or add me on Steam.
My Steam




Quote:
Originally Posted by Rp.KryptoNite View Post
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING
minimoney1 is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 10-24-2012 , 09:13   Re: Simple Chat Processor (Redux)
Reply With Quote #30

Ah yes,
PHP Code:
bool:recipients[MAXPLAYERS 1
Instead of adt_array would be awesome.
__________________
FaTony is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:18.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode