Like the title says, that's all I want to do. It seems simple enough but for some reason it doesn't work. When I remove the codes for the custom messages it works but when it's there it doesn't do anything, not even block the original sound.
PHP Code:
public Message_Audio(msg_id, msg_dest, msg_entity)
{
if(get_msg_args() != 3 || get_msg_argtype(2) != ARG_STRING)
return PLUGIN_CONTINUE
new arg2[20], wpn = get_user_weapon(msg_entity);
get_msg_arg_string(2, arg2, 19);
if(equal(arg2[1], "!MRAD_FIREINHOLE"))
{
if(wpn == CSW_HEGRENADE)
{
emessage_begin(MSG_ONE_UNRELIABLE, g_iMsgSendAudio, _, msg_entity);
ewrite_byte(msg_entity);
ewrite_string(grenade_snds[random_num(0, 1)]);
ewrite_short(PITCH_NORM);
emessage_end();
}
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
I've checked the API, the forums, some Russian sites I had to translate, and everything I could think of to google. I just want some help. Please don't make feel a lot more stupid than I already am...
__________________