Raised This Month: $ Target: $400
 0% 

How to change C4 message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 07-06-2013 , 19:28   How to change C4 message
Reply With Quote #1

Hi
How can i change this message:
"C4 must be planted at bomb site!"
to
"You Cant Plant The Bomb In This Game!"
__________________
Jhob94 is online now
Bos93
Veteran Member
Join Date: Jul 2010
Old 07-06-2013 , 19:39   Re: How to change C4 message
Reply With Quote #2

1) hook msg TextMsg
2) check your msg and change.
__________________

Last edited by Bos93; 07-07-2013 at 10:59.
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 07-06-2013 , 20:47   Re: How to change C4 message
Reply With Quote #3

Idk wich message is for bomb...
__________________
Jhob94 is online now
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 07-06-2013 , 22:53   Re: How to change C4 message
Reply With Quote #4

http://wiki.amxmodx.org/Half-Life_1_Game_Events
__________________
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
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 07-07-2013 , 05:46   Re: How to change C4 message
Reply With Quote #5

Quote:
Originally Posted by ^SmileY View Post
I was talking about wich message is for register bomb message that i need...
__________________
Jhob94 is online now
a7811311622
Member
Join Date: Apr 2010
Old 07-07-2013 , 06:08   Re: How to change C4 message
Reply With Quote #6

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_message(get_user_msgid("TextMsg"), "message_textmsg")
}

public 
message_textmsg()
{
    static 
textmsg[22]
    
get_msg_arg_string(2textmsgsizeof textmsg 1);
    
    if (
equal(textmsg"#C4_Plant_At_Bomb_Spot"))
    {
        
set_msg_arg_string(2"You Cant Plant The Bomb In This Game!")
    }

__________________
a7811311622 is offline
Serkan Kischa
Member
Join Date: Dec 2012
Old 07-07-2013 , 06:11   Re: How to change C4 message
Reply With Quote #7

change the code ..
Serkan Kischa is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 07-07-2013 , 06:45   Re: How to change C4 message
Reply With Quote #8

Still...
__________________
Jhob94 is online now
President
Member
Join Date: May 2013
Old 07-07-2013 , 07:58   Re: How to change C4 message
Reply With Quote #9

Code:
if (equal(textmsg, "#C4_Plant_At_Bomb_Spot"))
{
        set_msg_arg_string(2, "You Cant Plant The Bomb In This Game!")
}

-- >

if (equal(textmsg, "#C4_Plant_At_Bomb_Spot"))
{
        set_msg_arg_string(2, "You Cant Plant The Bomb In This Game!");
        return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;

Last edited by President; 07-07-2013 at 08:00.
President is offline
a7811311622
Member
Join Date: Apr 2010
Old 07-07-2013 , 08:09   Re: How to change C4 message
Reply With Quote #10

Try it
PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_message(get_user_msgid("TextMsg"), "message_textmsg")
}

public 
message_textmsg(msg_idmsg_destmsg_entity)
{
    static 
textmsg[32]
    
get_msg_arg_string(2textmsgsizeof textmsg 1);
    
    if (
equal(textmsg"#C4_Plant_At_Bomb_Spot"))
    {
        
message_begin(msg_destmsg_id_msg_entity)
        
write_byte(get_msg_arg_int(1))
        
write_string("You Cant Plant The Bomb In This Game!")
        
message_end()
        
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;

__________________
a7811311622 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 06:26.


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