Code:
// NOT MEANT TO BE USED, THIS IS AN EXAMPLE
#include <amxmodx>
#include <amxmisc>
#define SOUND_LOCATION "sounds/misc/whatever.wav"
public plugin_init()
{
register_plugin("Play Sound","1.0","Hawk552");
register_concmd("amx_playsound","PlaySound",ADMIN_KICK," - plays sound");
}
public plugin_precache()
{
precache_sound(SOUND_LOCATION);
}
public PlaySound(id,level,cid)
{
if(!cmd_access(id,level,cid,1))
{
return;
}
client_cmd(0,"play %s",SOUND_LOCATION);
// or you can use emit_sound()
return;
}
__________________