Code:
#include <amxmodx>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR ""
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("say","say_handle")
}
public say_handle(id)
{
static command[33]
read_argv(1,command,32)
if(equali(command,"omg")) {
// Do the sound here
// Emit Sound way:
emit_sound(id,CHAN_AUTO,"my_sound.wav",1.0,ATTN_NORM,0,PITCH_NORM) //- Emits the sound from the player
// Play to all clients:
client_cmd(0,"spk dir_to_sound/mysound.wav")
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
Simple enough, if you can understand that above code. It should work fine, just make sure you precache your sound(s) and ether emit or play the sound to the clients.