From deea8eb68675ab0c0458512fea4711bad6adf0c1 Mon Sep 17 00:00:00 2001 From: STAM Date: Sat, 26 Jul 2014 16:46:33 +0400 Subject: [PATCH] small fixes Added disconnect sound --- amxmodx/scripting/sound_connect_announce.sma | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/amxmodx/scripting/sound_connect_announce.sma b/amxmodx/scripting/sound_connect_announce.sma index cc2588b..4633f8a 100644 --- a/amxmodx/scripting/sound_connect_announce.sma +++ b/amxmodx/scripting/sound_connect_announce.sma @@ -15,8 +15,8 @@ Special thaks to: #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 +#define MEMBER_MUSIC "misc/member.wav" // Member sound, fixed +#define ADMIN_MUSIC "misc/admin.wav" // Admin sound, fixed public plugin_precache() { @@ -27,7 +27,7 @@ public plugin_precache() public plugin_init() { - register_plugin("Sound connect announce", "1.1", "papyrus_kn") + register_plugin("Sound connect announce", "1.1.1", "papyrus_kn, EpicMorg") register_cvar("sca_version", "1.1", FCVAR_SERVER|FCVAR_SPONLY) } @@ -42,3 +42,15 @@ public client_putinserver(id) else if(get_user_flags(id) & ADMIN_FLAG) client_cmd(0,"spk %s", ADMIN_MUSIC) } + +public client_disconnect(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) +} \ No newline at end of file