I need a plugin which plays a sound(eg:-welcome sound) when a player connects(at motd stage).
I have this code but this is'nt working :\ any suggestions??
Code:
/*
* Author: Ruffneck
* Plugin: Connect msg with sound.
*/
#include <amxmod>
#include <amxmisc>
public plugin_precache(){
if (file_exists("sound/misc/welcometonorthzone.wav"))
precache_sound("misc/welcometonorthzone.wav")
}
public client_connect(id) {
new s[32]
get_user_name(id,s,31)
if (file_exists("sound/misc/welcometonorthzone.wav")==1)
client_cmd(0,"spk misc/welcometonorthzone")
return PLUGIN_HANDLED
}
public plugin_init() {
register_plugin("Connect Sound","0.4","Rufneck")
return PLUGIN_CONTINUE
}
Any help would be appreciated
