This is a port of the Sank Sounds Plugin from AdminMod to AMXX
it has all its features + some new ones (MP3 SUPPORT)
Players can use keyword in chat and than wav files will be played keyword/wavfile combos are stored in SND-LIST.CFG and not hardcoded.
Put the configfile (snd_list.cfg) into this folder: "addons/amxmodx/configs"
The rar file contains some sounds (original sank sounds + new) and the SND-LIST.7z contains an example SND-LIST.CFG.
Code:
/*
* Credits:
* - Luke Sankey -> original author
* - HunteR -> modifications
*
* Functions included in this plugin:
* mp_sank_sounds_download 1/0 - turn internal download system on/off
* amx_sound - turn Sank Sounds on/off
* amx_sound_help - prints all available sounds to console
* amx_sound_play <dir/sound> - plays a specific wav/mp3/speech
* amx_sound_add <keyword> <dir/sound> - adds a word/wav/mp3/speech
* amx_sound_reload <filename> - reload your snd-list.cfg or custom .cfg
* amx_sound_remove <keyword> <dir/sound> - remove a word/wav/mp3
* amx_sound_write <filename> - write all settings to custom .cfg
* amx_sound_reset <player> - resets quota for specified player
* amx_sound_debug - prints debugs (debug mode must be on, see define below)
* amx_sound_ban <player> - bans player from using sounds for current map
* amx_sound_unban <player> - unbans player from using sounds for current map
* amx_sound_top <x> - shows the top <x> most played keywords (leave <x> away for top 10)
*
* Config file settings:
* SND_WARN - The number at which a player will get warned for playing too many sounds each map
* SND_MAX - The number at which a player will get muted for playing too many sounds each map
* SND_MAX_DUR - The maximum amount of seconds a player can play sounds each map (float )
* SND_JOIN - The Sounds to play when a person joins the game
* SND_EXIT - The Sounds to play when a person exits the game
* SND_DELAY - Minimum delay between sounds (float)
* SND_MODE XX - Determinates who can play and who can hear sounds (see readme.txt for details)
* SND_IMMUNITY "XYZ" - Determine the access levels which shall have immunity to warn/kick/ban
* SND_OBEY_DUR XX - Determine who shall obey duration before next sound will be played
* EXACT_MATCH 1/0 - Determinates if plugin triggers on exact match, or partial speech match
* ADMINS_ONLY 1/0 - Determinates if only admins are allowed to play sounds
* DISPLAY_KEYWORDS 1/0 - Determinates if keywords are shown in chat or not
* FREEZE_TIME_CON XX - Time in seconds to wait till first sounds are played (applies only to connect/disconnect sounds)
*
* Commands available for each player:
* amx_sound_help - prints all available sounds to console
* say "/soundson" - now the player can hear sounds again
* say "/soundsoff" - player disables ability to hear sounds
* say "/sounds" - shows a list of all sounds
*
History:VERY IMPORTANT ( 29.02.2008 )
Download the help.zip and READ it (English and German version included)
Updating to 1.9.0 or greater will require some little cfg file changes ( sry about that )
just add "sound/" (without quotes) to every WAV (so <mod-dir> is root)
eg: misc/haha.wav should now be sound/misc/haha.wav
Since 1.9.0 new configs were added and CVARs removed. Check changelog or help.7z for more info.
Source is also available at github:
https://github.com/ZTHawk/HL1_SankSounds