mirror of
https://github.com/EpicMorgVault/AMXx-Sound-connect-announce.git
synced 2025-01-12 22:07:56 +03:00
original plugin
This commit is contained in:
parent
fcf40083aa
commit
b4ec8497e8
44
amxmodx/scripting/sound_connect_announce.sma
Normal file
44
amxmodx/scripting/sound_connect_announce.sma
Normal file
@ -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 <amxmodx>
|
||||
|
||||
#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)
|
||||
}
|
BIN
sound/misc/admin.wav
Normal file
BIN
sound/misc/admin.wav
Normal file
Binary file not shown.
BIN
sound/misc/member.wav
Normal file
BIN
sound/misc/member.wav
Normal file
Binary file not shown.
BIN
sound/misc/player.wav
Normal file
BIN
sound/misc/player.wav
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user