Raised This Month: $ Target: $400
 0% 

[Any] Chat-Processor (Replacement for Simple Chat Processor)


Post New Thread Reply   
 
Thread Tools Display Modes
kaeming
Senior Member
Join Date: Nov 2015
Old 09-14-2016 , 07:32   Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
Reply With Quote #51

So can I use this as a replacement of Simple Chat Processor? Which means I will remove the one from zephyrus and use yours, will the store plugin by zeph still works? Thanks in advance
__________________
Add me up HERE if you have inquiries regarding server related stuff!
CS:GO Multimod & Jailbreak Servers > I am selling my entire ready to play server, add me up on steam to discuss.
kaeming is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 09-14-2016 , 09:43   Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
Reply With Quote #52

Quote:
Originally Posted by kaeming View Post
So can I use this as a replacement of Simple Chat Processor? Which means I will remove the one from zephyrus and use yours, will the store plugin by zeph still works? Thanks in advance
You will have to edit the forward names and prototypes and remove some code in order to make it work.
Drixevel is offline
kaeming
Senior Member
Join Date: Nov 2015
Old 09-15-2016 , 03:53   Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
Reply With Quote #53

Quote:
Originally Posted by redwerewolf View Post
You will have to edit the forward names and prototypes and remove some code in order to make it work.
I see, thanks alot!
__________________
Add me up HERE if you have inquiries regarding server related stuff!
CS:GO Multimod & Jailbreak Servers > I am selling my entire ready to play server, add me up on steam to discuss.
kaeming is offline
Kamil445
Member
Join Date: Dec 2013
Old 09-20-2016 , 06:11   Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
Reply With Quote #54

When I say "asd" i chat:

Game: TF2

Code:
L 09/20/2016 - 12:08:02: [SM] Exception reported: Invalid plugin address
L 09/20/2016 - 12:08:02: [SM] Blaming: chat-processor.smx()
L 09/20/2016 - 12:08:02: [SM] Call stack trace:
L 09/20/2016 - 12:08:02: [SM]   [0] Call_Finish
L 09/20/2016 - 12:08:02: [SM]   [1] Line 180, D:\Files\Google Drive\SourcePawn\Projects\Chat-Processor\scripting\chat-processor.sp::OnSayText2()
L 09/20/2016 - 12:08:02: [SM] Exception reported: Invalid plugin address
L 09/20/2016 - 12:08:02: [SM] Blaming: chat-processor.smx()
L 09/20/2016 - 12:08:02: [SM] Call stack trace:
L 09/20/2016 - 12:08:02: [SM]   [0] Call_Finish
L 09/20/2016 - 12:08:02: [SM]   [1] Line 180, D:\Files\Google Drive\SourcePawn\Projects\Chat-Processor\scripting\chat-processor.sp::OnSayText2()
L 09/20/2016 - 12:08:02: [SM] Exception reported: Invalid plugin address
L 09/20/2016 - 12:08:02: [SM] Blaming: chat-processor.smx()
L 09/20/2016 - 12:08:02: [SM] Call stack trace:
L 09/20/2016 - 12:08:02: [SM]   [0] Call_Finish
L 09/20/2016 - 12:08:02: [SM]   [1] Line 180, D:\Files\Google Drive\SourcePawn\Projects\Chat-Processor\scripting\chat-processor.sp::OnSayText2()
L 09/20/2016 - 12:08:02: [SM] Exception reported: Invalid plugin address
L 09/20/2016 - 12:08:02: [SM] Blaming: chat-processor.smx()
L 09/20/2016 - 12:08:02: [SM] Call stack trace:
L 09/20/2016 - 12:08:02: [SM]   [0] Call_Finish
L 09/20/2016 - 12:08:02: [SM]   [1] Line 180, D:\Files\Google Drive\SourcePawn\Projects\Chat-Processor\scripting\chat-processor.sp::OnSayText2()
L 09/20/2016 - 12:08:02: [SM] Exception reported: Invalid plugin address
L 09/20/2016 - 12:08:02: [SM] Blaming: chat-processor.smx()
L 09/20/2016 - 12:08:02: [SM] Call stack trace:
L 09/20/2016 - 12:08:02: [SM]   [0] Call_Finish
L 09/20/2016 - 12:08:02: [SM]   [1] Line 180, D:\Files\Google Drive\SourcePawn\Projects\Chat-Processor\scripting\chat-processor.sp::OnSayText2()
L 09/20/2016 - 12:08:02: [SM] Exception reported: Invalid plugin address
L 09/20/2016 - 12:08:02: [SM] Blaming: chat-processor.smx()
L 09/20/2016 - 12:08:02: [SM] Call stack trace:
L 09/20/2016 - 12:08:02: [SM]   [0] Call_Finish
L 09/20/2016 - 12:08:02: [SM]   [1] Line 180, D:\Files\Google Drive\SourcePawn\Projects\Chat-Processor\scripting\chat-processor.sp::OnSayText2()

Last edited by Kamil445; 09-20-2016 at 06:11.
Kamil445 is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 09-20-2016 , 06:38   Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
Reply With Quote #55

Quote:
Originally Posted by Kamil445 View Post
When I say "asd" i chat:

Game: TF2

Code:
L 09/20/2016 - 12:08:02: [SM] Exception reported: Invalid plugin address
L 09/20/2016 - 12:08:02: [SM] Blaming: chat-processor.smx()
L 09/20/2016 - 12:08:02: [SM] Call stack trace:
L 09/20/2016 - 12:08:02: [SM]   [0] Call_Finish
L 09/20/2016 - 12:08:02: [SM]   [1] Line 180, D:\Files\Google Drive\SourcePawn\Projects\Chat-Processor\scripting\chat-processor.sp::OnSayText2()
L 09/20/2016 - 12:08:02: [SM] Exception reported: Invalid plugin address
L 09/20/2016 - 12:08:02: [SM] Blaming: chat-processor.smx()
L 09/20/2016 - 12:08:02: [SM] Call stack trace:
L 09/20/2016 - 12:08:02: [SM]   [0] Call_Finish
L 09/20/2016 - 12:08:02: [SM]   [1] Line 180, D:\Files\Google Drive\SourcePawn\Projects\Chat-Processor\scripting\chat-processor.sp::OnSayText2()
L 09/20/2016 - 12:08:02: [SM] Exception reported: Invalid plugin address
L 09/20/2016 - 12:08:02: [SM] Blaming: chat-processor.smx()
L 09/20/2016 - 12:08:02: [SM] Call stack trace:
L 09/20/2016 - 12:08:02: [SM]   [0] Call_Finish
L 09/20/2016 - 12:08:02: [SM]   [1] Line 180, D:\Files\Google Drive\SourcePawn\Projects\Chat-Processor\scripting\chat-processor.sp::OnSayText2()
L 09/20/2016 - 12:08:02: [SM] Exception reported: Invalid plugin address
L 09/20/2016 - 12:08:02: [SM] Blaming: chat-processor.smx()
L 09/20/2016 - 12:08:02: [SM] Call stack trace:
L 09/20/2016 - 12:08:02: [SM]   [0] Call_Finish
L 09/20/2016 - 12:08:02: [SM]   [1] Line 180, D:\Files\Google Drive\SourcePawn\Projects\Chat-Processor\scripting\chat-processor.sp::OnSayText2()
L 09/20/2016 - 12:08:02: [SM] Exception reported: Invalid plugin address
L 09/20/2016 - 12:08:02: [SM] Blaming: chat-processor.smx()
L 09/20/2016 - 12:08:02: [SM] Call stack trace:
L 09/20/2016 - 12:08:02: [SM]   [0] Call_Finish
L 09/20/2016 - 12:08:02: [SM]   [1] Line 180, D:\Files\Google Drive\SourcePawn\Projects\Chat-Processor\scripting\chat-processor.sp::OnSayText2()
L 09/20/2016 - 12:08:02: [SM] Exception reported: Invalid plugin address
L 09/20/2016 - 12:08:02: [SM] Blaming: chat-processor.smx()
L 09/20/2016 - 12:08:02: [SM] Call stack trace:
L 09/20/2016 - 12:08:02: [SM]   [0] Call_Finish
L 09/20/2016 - 12:08:02: [SM]   [1] Line 180, D:\Files\Google Drive\SourcePawn\Projects\Chat-Processor\scripting\chat-processor.sp::OnSayText2()
What's your forward code look like in other plugins that use the forward?
Drixevel is offline
TrappaTroopa
Senior Member
Join Date: Feb 2016
Old 09-20-2016 , 17:49   Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
Reply With Quote #56

Quote:
Originally Posted by redwerewolf View Post
You will have to edit the forward names and prototypes and remove some code in order to make it work.
So I edited the Zeph Store plugin so colors work work with this plugin. But each message is duplicated in chat.
TrappaTroopa is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 09-20-2016 , 18:06   Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
Reply With Quote #57

Quote:
Originally Posted by TrappaTroopa View Post
So I edited the Zeph Store plugin so colors work work with this plugin. But each message is duplicated in chat.
Post your code?
sneaK is offline
TrappaTroopa
Senior Member
Join Date: Feb 2016
Old 09-20-2016 , 18:34   Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
Reply With Quote #58

Quote:
Originally Posted by blackhawk74 View Post
Post your code?
See Attached Pic

Edited line 82 and changed include
scpsupport.inc
Code:
#if defined STANDALONE_BUILD
#include <sourcemod>
#include <sdktools>

#include <store>
#include <zephstocks>
#include <chatprocessor>
#endif

new String:g_szNameTags[STORE_MAX_ITEMS][MAXLENGTH_NAME];
new String:g_szNameColors[STORE_MAX_ITEMS][32];
new String:g_szMessageColors[STORE_MAX_ITEMS][32];

new g_iNameTags = 0;
new g_iNameColors = 0;
new g_iMessageColors = 0;

#if defined STANDALONE_BUILD
public OnPluginStart()
#else
public SCPSupport_OnPluginStart()
#endif
{    
    if(FindPluginByFile("simple-chatprocessor.smx")==INVALID_HANDLE)
    {
        LogError("Simple Chat Processor isn't installed or failed to load. SCP support will be disabled. (http://forums.alliedmods.net/showthread.php?t=198501)");
        return;
    }

    Store_RegisterHandler("nametag", "tag", SCPSupport_OnMappStart, SCPSupport_Reset, NameTags_Config, SCPSupport_Equip, SCPSupport_Remove, true);
    Store_RegisterHandler("namecolor", "color", SCPSupport_OnMappStart, SCPSupport_Reset, NameColors_Config, SCPSupport_Equip, SCPSupport_Remove, true);
    Store_RegisterHandler("msgcolor", "color", SCPSupport_OnMappStart, SCPSupport_Reset, MsgColors_Config, SCPSupport_Equip, SCPSupport_Remove, true);
}

public SCPSupport_OnMappStart()
{
}

public SCPSupport_Reset()
{
    g_iNameTags = 0;
    g_iNameColors = 0;
    g_iMessageColors = 0;
}

public NameTags_Config(&Handle:kv, itemid)
{
    Store_SetDataIndex(itemid, g_iNameTags);
    KvGetString(kv, "tag", g_szNameTags[g_iNameTags], sizeof(g_szNameTags[]));
    ++g_iNameTags;
    
    return true;
}

public NameColors_Config(&Handle:kv, itemid)
{
    Store_SetDataIndex(itemid, g_iNameColors);
    KvGetString(kv, "color", g_szNameColors[g_iNameColors], sizeof(g_szNameColors[]));
    ++g_iNameColors;
    
    return true;
}

public MsgColors_Config(&Handle:kv, itemid)
{
    Store_SetDataIndex(itemid, g_iMessageColors);
    KvGetString(kv, "color", g_szMessageColors[g_iMessageColors], sizeof(g_szMessageColors[]));
    ++g_iMessageColors;
    
    return true;
}

public SCPSupport_Equip(client, id)
{
    return -1;
}

public SCPSupport_Remove(client, id)
{
}

public Action OnChatMessage(int& author, Handle recipients, eChatFlags& flag, char[] name, char[] message, bool& bProcessColors, bool& bRemoveColors)
{
    new m_iEquippedNameTag = Store_GetEquippedItem(client, "nametag");
    new m_iEquippedNameColor = Store_GetEquippedItem(client, "namecolor");
    new m_iEquippedMsgColor = Store_GetEquippedItem(client, "msgcolor");
    
    if(m_iEquippedNameTag < 0 && m_iEquippedNameColor < 0 && m_iEquippedMsgColor < 0)
        return Plugin_Continue;
    
    new String:m_szName[MAXLENGTH_NAME*2];
    new String:m_szNameTag[MAXLENGTH_NAME];
    new String:m_szNameColor[32];
    
    if(m_iEquippedNameTag >= 0)
    {
        new m_iNameTag = Store_GetDataIndex(m_iEquippedNameTag);
        strcopy(STRING(m_szNameTag), g_szNameTags[m_iNameTag]);
    }
    if(m_iEquippedNameColor >= 0)
    {
        new m_iNameColor = Store_GetDataIndex(m_iEquippedNameColor);
        strcopy(STRING(m_szNameColor), g_szNameColors[m_iNameColor]);
    }
    Format(STRING(m_szName), "%s%s%s", m_szNameTag, m_szNameColor, name);
    ReplaceColors(STRING(m_szName), client);
    strcopy(name, MAXLENGTH_NAME, m_szName);

    if(m_iEquippedMsgColor >= 0)
    {
        new String:m_szMessage[MAXLENGTH_INPUT];
        strcopy(STRING(m_szMessage), message);
        Format(message, MAXLENGTH_INPUT, "%s%s", g_szMessageColors[Store_GetDataIndex(m_iEquippedMsgColor)], m_szMessage);
        ReplaceColors(message, MAXLENGTH_INPUT, client);
    }

    return Plugin_Changed;
}
Attached Thumbnails
Click image for larger version

Name:	Duplicate Chat.PNG
Views:	301
Size:	68.6 KB
ID:	157509  

Last edited by TrappaTroopa; 09-20-2016 at 18:48.
TrappaTroopa is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 09-20-2016 , 18:49   Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
Reply With Quote #59

Quote:
Originally Posted by TrappaTroopa View Post
See Attached Pic

Edited line 82 and changed include
scpsupport.inc
Code:
#if defined STANDALONE_BUILD
#include <sourcemod>
#include <sdktools>

#include <store>
#include <zephstocks>
#include <chatprocessor>
#endif

new String:g_szNameTags[STORE_MAX_ITEMS][MAXLENGTH_NAME];
new String:g_szNameColors[STORE_MAX_ITEMS][32];
new String:g_szMessageColors[STORE_MAX_ITEMS][32];

new g_iNameTags = 0;
new g_iNameColors = 0;
new g_iMessageColors = 0;

#if defined STANDALONE_BUILD
public OnPluginStart()
#else
public SCPSupport_OnPluginStart()
#endif
{    
    if(FindPluginByFile("simple-chatprocessor.smx")==INVALID_HANDLE)
    {
        LogError("Simple Chat Processor isn't installed or failed to load. SCP support will be disabled. (http://forums.alliedmods.net/showthread.php?t=198501)");
        return;
    }

    Store_RegisterHandler("nametag", "tag", SCPSupport_OnMappStart, SCPSupport_Reset, NameTags_Config, SCPSupport_Equip, SCPSupport_Remove, true);
    Store_RegisterHandler("namecolor", "color", SCPSupport_OnMappStart, SCPSupport_Reset, NameColors_Config, SCPSupport_Equip, SCPSupport_Remove, true);
    Store_RegisterHandler("msgcolor", "color", SCPSupport_OnMappStart, SCPSupport_Reset, MsgColors_Config, SCPSupport_Equip, SCPSupport_Remove, true);
}

public SCPSupport_OnMappStart()
{
}

public SCPSupport_Reset()
{
    g_iNameTags = 0;
    g_iNameColors = 0;
    g_iMessageColors = 0;
}

public NameTags_Config(&Handle:kv, itemid)
{
    Store_SetDataIndex(itemid, g_iNameTags);
    KvGetString(kv, "tag", g_szNameTags[g_iNameTags], sizeof(g_szNameTags[]));
    ++g_iNameTags;
    
    return true;
}

public NameColors_Config(&Handle:kv, itemid)
{
    Store_SetDataIndex(itemid, g_iNameColors);
    KvGetString(kv, "color", g_szNameColors[g_iNameColors], sizeof(g_szNameColors[]));
    ++g_iNameColors;
    
    return true;
}

public MsgColors_Config(&Handle:kv, itemid)
{
    Store_SetDataIndex(itemid, g_iMessageColors);
    KvGetString(kv, "color", g_szMessageColors[g_iMessageColors], sizeof(g_szMessageColors[]));
    ++g_iMessageColors;
    
    return true;
}

public SCPSupport_Equip(client, id)
{
    return -1;
}

public SCPSupport_Remove(client, id)
{
}

public Action OnChatMessage(int& author, Handle recipients, eChatFlags& flag, char[] name, char[] message, bool& bProcessColors, bool& bRemoveColors)
{
    new m_iEquippedNameTag = Store_GetEquippedItem(client, "nametag");
    new m_iEquippedNameColor = Store_GetEquippedItem(client, "namecolor");
    new m_iEquippedMsgColor = Store_GetEquippedItem(client, "msgcolor");
    
    if(m_iEquippedNameTag < 0 && m_iEquippedNameColor < 0 && m_iEquippedMsgColor < 0)
        return Plugin_Continue;
    
    new String:m_szName[MAXLENGTH_NAME*2];
    new String:m_szNameTag[MAXLENGTH_NAME];
    new String:m_szNameColor[32];
    
    if(m_iEquippedNameTag >= 0)
    {
        new m_iNameTag = Store_GetDataIndex(m_iEquippedNameTag);
        strcopy(STRING(m_szNameTag), g_szNameTags[m_iNameTag]);
    }
    if(m_iEquippedNameColor >= 0)
    {
        new m_iNameColor = Store_GetDataIndex(m_iEquippedNameColor);
        strcopy(STRING(m_szNameColor), g_szNameColors[m_iNameColor]);
    }
    Format(STRING(m_szName), "%s%s%s", m_szNameTag, m_szNameColor, name);
    ReplaceColors(STRING(m_szName), client);
    strcopy(name, MAXLENGTH_NAME, m_szName);

    if(m_iEquippedMsgColor >= 0)
    {
        new String:m_szMessage[MAXLENGTH_INPUT];
        strcopy(STRING(m_szMessage), message);
        Format(message, MAXLENGTH_INPUT, "%s%s", g_szMessageColors[Store_GetDataIndex(m_iEquippedMsgColor)], m_szMessage);
        ReplaceColors(message, MAXLENGTH_INPUT, client);
    }

    return Plugin_Changed;
}
I posted a modified version of this plugin in the store thread.
Drixevel is offline
TrappaTroopa
Senior Member
Join Date: Feb 2016
Old 09-20-2016 , 20:27   Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
Reply With Quote #60

Quote:
Originally Posted by redwerewolf View Post
I posted a modified version of this plugin in the store thread.
You're my hero! Did you have to make other changes? What fixed that double post bug?
TrappaTroopa is offline
Reply



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:25.


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