Raised This Month: $ Target: $400
 0% 

TextMsg isnt working


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 07-23-2013 , 20:01   Re: TextMsg isnt working
Reply With Quote #2

Not tested

PHP Code:
#include <amxmodx>

#define BLOCK_MESSAGE     PLUGIN_HANDLED     // Change it to PLUGIN_CONTINUE to not block orignal message :)

new p_Message;

public 
plugin_init()
{
    
register_plugin("Taking Fire Message",AMXX_VERSION_STR,"SmileY");
    
    
register_message(get_user_msgid("TextMsg"),"message_TextMsg");
    
    
p_Message     register_cvar("msg_takingfire","Taking Fire, Save Me Guys!");
}

public 
message_TextMsg(iMsg,iDest,iEntity)
{
    static 
szMessage[64];
    
get_msg_arg_string(2,szMessage,charsmax(szMessage));
    
    if(
equal(szMessage,"#Taking_fire"))
    {
        new 
szReplace[128];
        
get_pcvar_string(p_Message,szReplace,charsmax(szReplace));
        
        if(
szReplace[0])
        {
            
message_begin(iDest,iMsg,_,iEntity);
            
write_byte(get_msg_arg_int(1));
            
write_string(szReplace);
            
message_end();
            
            return 
BLOCK_MESSAGE;
        }
    }
    return 
PLUGIN_CONTINUE;

__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
 



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 06:23.


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