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:46   Re: TextMsg isnt working
Reply With Quote #4

Quote:
Originally Posted by UchihaSkills View Post
OP your plugin cant work if you use this code..
Really its a mistake, try this.


PHP Code:
#include <amxmodx>

new p_Message;

public 
plugin_init()
{
    
register_plugin("Mensagens padroes",AMXX_VERSION_STR,"Giovanni ;)");
    
    
register_message(get_user_msgid("TextMsg"),"message_TextMsg");
    
    
p_Message register_cvar("amx_msg_taking_fire","Taking Fire, Save Me Guys!");
}

public 
message_TextMsg(iMsg,iDest,iEntity)
{
    if(
get_msg_args() != || get_msg_argtype(3) != ARG_STRING || get_msg_argtype(5) != ARG_STRING) return PLUGIN_CONTINUE;
    
    new 
szMessage[32];
    
get_msg_arg_string(5,szMessage,charsmax(szMessage));
    
    if(
equali(szMessage,"#Taking_fire"))
    {
        static 
szReplaced[128];
        
get_pcvar_string(p_Message,szReplaced,charsmax(szReplaced));
        
        if(
szReplaced[0])
        {
            
message_begin(iDest,iMsg,_,iEntity);
            
write_byte(print_chat);
            
write_string(szReplaced);
            
message_end();
            
            return 
PLUGIN_HANDLED;     // Replace to PLUGIN_CONTINUE to show original chat 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