Forum

Full Version: Connect/Disconnect sounds
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This plugin plays a sound on player connect and a sound on player disconnect.

Code:
#include <amxmodx>

#define    PLUGIN    "Connect Sound"
#define    VERSION    "1.0"
#define    AUTHOR    "sToP !"

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
}

public plugin_precache()
{
    precache_sound("buttons/bell1.wav");
    precache_sound("barney/seeya.wav");
}
public client_putinserver()
{
    client_cmd(0, "spk buttons/bell1.wav");
    return PLUGIN_CONTINUE;
}
public client_disconnect()
{
    client_cmd(0, "spk barney/seeya.wav");
    return PLUGIN_CONTINUE;
}