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

Good way to hook the chat?


Post New Thread Reply   
 
Thread Tools Display Modes
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-02-2012 , 06:47   Re: Good way to hook the chat?
Reply With Quote #21

The thing is, at some point, reading your posts dark_style, you have a wall of knowledge in front of you, and you are not tall enough to jump over this. What I'm saying is, the answer has been already given above, with explanations, and you still struggle to figure out how what to do. The point is, since you don't understand the explanations, therefore full code would be needed to show you what you should do, but that would be the same as you were posting in the request section and you should be aware now that testing randomly code without knowing what you do, will drive you nowhere. Right now, it's obvious you can't deal with such [basic] code, you lack of knowledge and that's something far above your head. Either leave the matter for someone else, or learn more yourself how work the game (HLSDK, hooking game message and observing/testing, etc.).
__________________

Last edited by Arkshine; 07-02-2012 at 06:53.
Arkshine is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 07-02-2012 , 07:06   Re: Good way to hook the chat?
Reply With Quote #22

Sorry, not gonna ask anymore in this forum. Sorry for taking your time, you should lock/trash this thread.
dark_style is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-02-2012 , 07:18   Re: Good way to hook the chat?
Reply With Quote #23

That's, for sure, not the right behavior, if you want to improve your knowledge.
__________________
Arkshine is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 07-02-2012 , 11:22   Re: Good way to hook the chat?
Reply With Quote #24

Thanks to <VeCo> I understood what am I doing. So, here is the working code.
PHP Code:
#include <amxmodx> 

public plugin_init() 
{
    
register_plugin("Test""0.0.1""ConnorMcLeod")
    
register_message(get_user_msgid("SayText"), "Message_SayText"


public 
Message_SayText() 

    new 
szChannel[40
    
get_msg_arg_string(2szChannelcharsmax(szChannel)) 
     
    if(
equal(szChannel"#Cstrike_Chat"13)) 
    { 
        if(
equal(szChannel"#Cstrike_Chat_All")) 
        { 
            
format(szChannelcharsmax(szChannel), "^4[Haha] ^3%%s1 ^1: %%s2"
        } 
        else 
        { 
            
format(szChannelcharsmax(szChannel), "^4[Haha] ^3%s"szChannel
        } 
        
set_msg_arg_string(2szChannel
    } 


Last edited by dark_style; 07-02-2012 at 11:27.
dark_style 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 03:03.


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