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;
}
__________________