Raised This Month: $ Target: $400
 0% 

TextMsg isnt working


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 07-23-2013 , 19:27   TextMsg isnt working
Reply With Quote #1

Hello
I tried this:
PHP Code:
#include <amxmodx>

new tf

public plugin_init() {
    
register_plugin("Taking Fire Changer""0.0.1""Author")
    
    
register_message(get_user_msgid("TextMsg"), "message_textmsg")
    
    
tf register_cvar("msg_takingfire""Taking Fire, Save Me Guys!")
}

public 
message_textmsg(msg_idmsg_destmsg_entity) {
    static 
textmsg[32]
    
get_msg_arg_string(2textmsgsizeof textmsg 1)
    
    new 
new_message[121]
    
    if(
equal(textmsg"#Taking_fire"))
        
get_pcvar_string(tfnew_message120)
        
    else
        return
        
    
message_begin(msg_destmsg_id_msg_entity)
    
write_byte(get_msg_arg_int(1))
    
format(new_message120"%s"new_message)
    
write_string(new_message)
    
message_end()

Well idk if problem is about arguments or if it is because of format, but the message that is displayed is the default one...
__________________

Last edited by Jhob94; 07-23-2013 at 19:27.
Jhob94 is offline
 



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