AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to change C4 message (https://forums.alliedmods.net/showthread.php?t=220081)

Jhob94 07-06-2013 19:28

How to change C4 message
 
Hi
How can i change this message:
"C4 must be planted at bomb site!"
to
"You Cant Plant The Bomb In This Game!"

Bos93 07-06-2013 19:39

Re: How to change C4 message
 
1) hook msg TextMsg
2) check your msg and change.

Jhob94 07-06-2013 20:47

Re: How to change C4 message
 
Idk wich message is for bomb...

^SmileY 07-06-2013 22:53

Re: How to change C4 message
 
http://wiki.amxmodx.org/Half-Life_1_Game_Events

Jhob94 07-07-2013 05:46

Re: How to change C4 message
 
Quote:

Originally Posted by ^SmileY (Post 1985072)

I was talking about wich message is for register bomb message that i need...

a7811311622 07-07-2013 06:08

Re: How to change C4 message
 
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!")
    }



Serkan Kischa 07-07-2013 06:11

Re: How to change C4 message
 
change the code ..

Jhob94 07-07-2013 06:45

Re: How to change C4 message
 
Still...
http://www.fileden.com/files/2012/10...7-07_00002.jpg

President 07-07-2013 07:58

Re: How to change C4 message
 
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;


a7811311622 07-07-2013 08:09

Re: How to change C4 message
 
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;




All times are GMT -4. The time now is 06:26.

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