Something like this :
Code:
#include <amxmodx>
#if AMXX_VERSION_NUM < 180
#define charsmax(%1) sizeof(%1) - 1
#endif
#define PLUGIN "Leave Sounds"
#define VERSION "1.0"
#define AUTHOR "Amxx Community"
new const soundlist[][] = {
"konczyc.wav",
"naraska.wav",
"3maj.wav",
"cya.wav",
"narka.wav",
"elo.wav"
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public plugin_precache() {
new file[32]
for(new i; i<sizeof soundlist; i++)
{
formatex(file, charsmax(file), "FtF/%s", soundlist[i])
precache_sound(file)
}
}
public client_disconnect(id) {
new rand = random_num(0, charsmax(soundlist))
client_cmd(0, "spk FtF/%s", soundlist[rand])
}