PHP Code:
#include <amxmodx>
#include <amxmisc>
new const plname[]="voice_rules"
new const plvers[]="1.0"
new const plauth[]="killer"
#define ACCESS ADMIN_LEVEL_A //Admin with flag "m".
public plugin_init()
{
register_plugin(plname,plvers,plauth)
register_concmd("amx_vrules","cmdSound",ACCESS)
}
public plugin_precache()
precache_sound("sound/misc/firstblood.wav") //your sound in HL format instead of "firstblood.wav".
public cmdSound(id,level,cid)
{
if(!cmd_access(id,level,cid,1))
return PLUGIN_HANDLED
emit_sound(id,CHAN_VOICE,"sound/misc/firstblood.wav",1.0,ATTN_NORM,0,PITCH_NORM ) // Non-standart files must be precached!
client_print(id,print_console,"[AMXX] Voice Rules!.") //Your text for example.
return PLUGIN_HANDLED
}
After typing "amx_vrules" in console, your sound will be played.