Hi guys! Long time no post. Anyway I was wondering if anyone could teach me how to use SendAudio message. I'm trying to utilize the "hostage down" sound clip. I've already hooked the event but I can't produce the sound. I can always use
client_cmd(id, "spk %s", whatever.wav) but I have the impression this will not make it a real radio message. Anyway, here's the code:
PHP Code:
new msg_SendAudio;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("TextMsg", "Event_Hostage_Killed", "b", "2=#Killed_Hostage");
// register_event("SendAudio", "EventSendAudio", "a", "1=0", "2=%!MRAD_hosdown");
msg_SendAudio = get_user_msgid("SendAudio");
}
public Event_Hostage_Killed()
{
// client_print(1, print_chat, "I did?");
message_begin(MSG_ONE_UNRELIABLE, msg_SendAudio);
write_byte(1); // Sender ID
write_string("%!MRAD_hosdown"); // Audio Code
write_short(1<<1); // Pitch
message_end();
}
I know the values are messed up. I really don't know what to put exactly...
__________________