Code:
#include <amxmodx>
#include <amxmisc>
plublic plugin_init()
{
register_plugin("Admin Sounds", "1.0", "Teh Wooters Ate the Hooters")
register_concmd("amx_sound", "cmdsound", ADMIN_SLAY, "<Sound name> Plays a sound for the server")
}
plublic cmdsound(id,level,cid)
{
new output[64]
if(!cmd_access(id,level,cid,1)) {
return PLUGIN_HANDLED
}
read_argv(1,output,63)
client_cmd(0,"speak ^"sound/adminsound/%s^"",output)
client_print(0,print_chat,"[♀] Server has made everyone listen to %s!",output)
return PLUGIN_CONTINUE
}
public plugin_precache() {
/*
precache_sound("sound/adminsound/whatever.wav")
precache_sound("sound/adminsound/whatever.wav")
precache_sound("sound/adminsound/whatever.wav")
// Only if the client does not download the wav when they join.
*/
Note: In the client print if u see a ♀ or a bunch of random numbers, compile anyway and see if it will work. If not, dam, you cant see my secret message :twisted: