diff --git a/amxmodx/scripting/sound_connect_announce.sma b/amxmodx/scripting/sound_connect_announce.sma new file mode 100644 index 0000000..cc2588b --- /dev/null +++ b/amxmodx/scripting/sound_connect_announce.sma @@ -0,0 +1,44 @@ +/* +Plugin made by papyrus_kn. +Visit: http://www.amxmodxbg.org - The official site for AMX Mod X in Bulgaria +Special thaks to: + Heavy - for the plugin idea + He3aBuCuM - for fixing the code + Burton - for testing + radko412 - for testing + hateYou - for new order of the code +*/ + +#include + +#define ADMIN_FLAG ADMIN_LEVEL_A // Flag for admin sound +#define MEMBER_FLAG ADMIN_BAN // Flag for member sound + +#define PLAYER_MUSIC "misc/player.wav" // Player sound +#define MEMBER_MUSIC "misc/admin.wav" // Member sound +#define ADMIN_MUSIC "misc/member.wav" // Admin sound + +public plugin_precache() +{ + precache_sound(PLAYER_MUSIC) + precache_sound(MEMBER_MUSIC) + precache_sound(ADMIN_MUSIC) +} + +public plugin_init() +{ + register_plugin("Sound connect announce", "1.1", "papyrus_kn") + register_cvar("sca_version", "1.1", FCVAR_SERVER|FCVAR_SPONLY) +} + +public client_putinserver(id) +{ + if(get_user_flags(id) & ADMIN_USER) + client_cmd(0,"spk %s", PLAYER_MUSIC) + + else if(get_user_flags(id) & MEMBER_FLAG) + client_cmd(0,"spk %s", MEMBER_MUSIC) + + else if(get_user_flags(id) & ADMIN_FLAG) + client_cmd(0,"spk %s", ADMIN_MUSIC) +} diff --git a/sound/misc/admin.wav b/sound/misc/admin.wav new file mode 100644 index 0000000..fd60f4d Binary files /dev/null and b/sound/misc/admin.wav differ diff --git a/sound/misc/member.wav b/sound/misc/member.wav new file mode 100644 index 0000000..d2e4423 Binary files /dev/null and b/sound/misc/member.wav differ diff --git a/sound/misc/player.wav b/sound/misc/player.wav new file mode 100644 index 0000000..c08e570 Binary files /dev/null and b/sound/misc/player.wav differ