AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Sank Sounds (Luke Sankey) (v1.8.4) (https://forums.alliedmods.net/showthread.php?t=5055)

karlos 08-20-2004 10:35

Sank Sounds (Luke Sankey) (v1.9.1)
 
15 Attachment(s)
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)

Previous downloads:


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

martinrb 08-20-2004 13:31

works very nicely

thank god theres sanks sounds plugin again.
there was this sychosound plugin for amxx but that worked like a pile of wet horseshit.
give it a 5 outta 5

Jedi 08-21-2004 11:51

Thanks for porting this - great plugin.

narcussist 08-21-2004 16:42

for some reason when ever i use this plugin or at that matter any sound d/l plugin, it always freezes people at the verifying resources. And way to fix this?

supermj 08-21-2004 18:37

Mine locks up shortly after round starts. CZ Windows server. No error messages in amxx log.

Also tried another plug that did sound and cuss filter, and it locked up before map could even start.

narcussist 08-21-2004 19:10

mine would lock up like i said at verifying recorses, i would look on the console screen and it would show nothing wrong, like they was just connected, but they would stay there till they exited, no timeout nothing

karlos 08-21-2004 22:20

@narcussist: only with this or other plugins too? try cl_allowupload 1 and download 1, maybe this helps

@supermj: lock up cause of this plugin or do u have it with other too? cant test it on CZ (dont have it) but it should work, maybe something else is wrong

supermj 08-21-2004 22:24

As soon as I enable it, at mapchange, a few seconds it, it locks up. Disable, restart server...it's good.

narcussist 08-21-2004 22:36

Quote:

Originally Posted by karlos
@narcussist: only with this or other plugins too? try cl_allowupload 1 and download 1, maybe this helps

always have that set like that, i even have sv_downloadurl set also

karlos 08-22-2004 10:52

sry guys but i dont know whats wrong, i tested with STEAM: cs 1.6 and natural selection, WON: opfor and cs 1.5, all working

maybe its something with CZ or there r other probs, sry guys

narcussist 08-22-2004 12:05

o i play dod, sorry i didnt mention that

karlos 08-23-2004 08:21

just tested with dod and it works fine, client can connect with no freeze

last idea: check if all the sounds u have in SND-LIST.cfg really exists (but dont think thats this is a prob cause i have myself sounds in sndlist.cfg that dont exists)

Jedi 08-24-2004 19:53

Works for me on DOD v1.3 Steam - just make sure the server actually has the sound files installed that you want to use, because the sounds listed in the snd-lst.cfg file get pre-cached - so your clients are trying to download the sound files when they connect. If you don't have the sound files at your sv_downloadurl then they are trying to download from the game server - which could take a while if you have large sound files. Not sure if that is the problem, but something to consider.

karlos 08-25-2004 12:28

updated, now file will be checked if exist before precache, maybe now some error are solved

karlos 09-03-2004 15:41

UPDATE:
- a nasty bug was fixed (whenever chat message was longer than 29 char a wav was played)
- config folder is not hardcoded anymore

supermj 09-03-2004 16:03

It still locks up cz. Just a warning to everyone.

ancient1 09-30-2004 19:18

Just tried both the 0.16 and 0.20 versions on my RC6 powered TFC server, the SND config is being read I can see the sound keywords listed using amx_sound_help, however nothing is being played?

No join sounds, no leave sounds and nothing is picked up from chat as a key word, hence nothing played :(

80.190.246.176:27015 Royston Vasey

Thats the server, you can see for yourselves...

Help please, I would love to get this to work right.

This is my snd.cfg

Quote:

# TimeStamp: 02:27 July 08, 2001
# File created by: Admin
# Important parameters:
SND_KICK; 20
SND_WARN; 17
SND_JOIN; misc/hibabe.wav;misc/hi.wav;misc/himan.wav
SND_EXIT; misc/comeagain.wav;misc/goodbye.wav;misc/beback.wav;misc/bye_love.wav;misc/gtg.wav
SND_DELAY; 0
SND_SPLIT; 0
EXACT_MATCH; 0

# Word/Wav combinations:
woohoo; sound/misc/woohoo.wav;sound/misc/woohoo2.wav
crap; sound/misc/awwcrap.wav;sound/misc/awwcrap2.wav;sound/misc/awwman.wav
haha; sound/misc/haha.wav
doh; sound/misc/doh.wav;sound/misc/doh2.wav;sound/misc/doh3.wav;sound/misc/doh4.wav;sound/misc/doh5.wav;sound/misc/doh7.wav;sound/misc/dohoo.wav;sound/misc/dohnuts.wav
bud; sound/misc/bud.wav;sound/misc/weis.wav;sound/misc/er.wav
ouch; sound/misc/ow.wav
doomed; sound/misc/doomed.wav
osama; sound/misc/taliban.wav
aol; sound/misc/aol.wav
chocolate; sound/misc/schoki.wav
brb; misc/brb.wav
owned; misc/taunt.wav
help; misc/help.wav
wtf; misc/wtf.wav;misc/wtf2.wav
why; misc/why.wav
nice; misc/nice.wav
ffs; misc/goddamn.wav
fun; misc/fun.wav
gameover; misc/gameover.wav
complain; misc/worse.wav
damn; misc/damit.wav
hi; misc/hi2.wav;misc/hi3.wav;misc/howdoing.wav
hello; misc/hi2.wav;misc/hi3.wav;misc/howdoing.wav
wd; misc/king.wav
run; misc/runaway.wav
gg; misc/goodshow.wav
local; misc/local.wav;misc/local2.wav;misc/local3.wav;misc/local4.wav;misc/local5.wav

All the corresponding sounds are in the sound/misc folder.

Please help

Ancient

karlos 10-01-2004 14:07

have u read the intruction inside the sma?
only the first wav off each keyword should not work right

there is write that after each keyword there must be
a) NO space
or
b) minimum 2 spaces (tab counts as one space)

and as i see u have only 1 space

scout121 10-01-2004 14:48

im running it on cz RC6 and i followed everything to a T but the sounds arnt beind downloaded by the other players. Console says the plugin is running and
L 10/01/2004 - 14:42:47: [sank_sounds.amxx] Sank Sound Plugin >> Sound quota set to 20
Sank Sound Plugin >> addons/amxmodx/configs/SND-LIST.CFG successfully loaded.

I even tried it with debug set to 0.

Any ideas?

karlos 10-01-2004 15:02

look my post above
a) NO space
or
b) minimum 2 spaces (tab counts as one space)

ancient1 10-01-2004 15:07

Do you see any spaces in the words I posted?

It just dont work...

However I was having issues with the metmod plugins.ini order, as amxx RC6 seems to only like a certain order, so I shall try it again at a quiet time and report back..

Ancient

scout121 10-01-2004 15:55

i copied the exact config file from the zip and yes i tried deleting all the spaces too. Is the .wav file read from my czero folder or dedserver/czero folder?

karlos 10-01-2004 20:23

by spaces i DONT mean in wavs/words (that may not be of course) BUT between keyword and wav
THIS WILL BE FIXED TOMORROW (not now cause need to test new/forgotten feature)

they are read from <moddir>/sound/... (eg: wav is in moddir/sound/mysounds/hiall.wav u have to put mysounds/hiall.wav into .cfg)

holzberg 10-01-2004 22:12

Quote:

Originally Posted by martinrb
works very nicely

thank god theres sanks sounds plugin again.
there was this sychosound plugin for amxx but that worked like a pile of wet horseshit.
give it a 5 outta 5

What is wrong with psychosounds? I ported it from amx to amxx VERY EASILY and I have no problems what so ever. (using 0.20 RC6)

karlos 10-02-2004 11:45

updated new version 1.1:
- fixed bug with spaces between keywords and wavs
- multiple Join and Exit sounds can now be used (everyone expected this to work (me too :roll: ), but now it works)
- fixed bug where connect and disconnect sound have not been played

1.1.1(hotfix)
- just removes an error msg

ancient1 10-02-2004 16:03

Works a treat now!! :D

However, every now and then it goes through a spell of not playing the sounds for some reason? May be something to do with the size of the .wav mebe? not sure...

HOWEVER, big however!! it precaches the sounds, fine if you have a fast downloadurl but this removes the option of making them optional for the players. Some dont like sound spam and I would prefer to make it a optional sound pack download from my webby.

So request....

Could you please make another version that does not precache the sounds, this would make it pretty much perfect for me ;)

Thankyou,

Ancient

karlos 10-02-2004 16:27

it doesnt play the sounds from the soundpack or your custom?
i noticed it with custom wavs but that was on won, dont know if still with steam cause i have not added new sounds recently
but its not the file size but rather the bit depth and sample rate
some play with 8bit 11Khz other dont (dont know why, its hl)
try to resample or increase bit depth or both

i dont really want to make a new one, But do this:
just delete the plugin_precache function and recompile
Code:
public plugin_precache(){     new configpath[60]     get_configsdir(configpath,60)     format(FILENAME,127,"%s/SND-LIST.CFG",configpath) // Name of file to parse     parse_sound_file(FILENAME)     new i     for ( i = 0; i < MAX_KEYWORDS + 2; ++i ){         new j         for ( j=0; j < MAX_RANDOM; ++j ){             if ( i < MAX_KEYWORDS && strlen(WordWavCombo[i][TOK_LENGTH*(j+1)]) ){                 new temp[128]                 format(temp,127,"sound/%s",WordWavCombo[i][TOK_LENGTH*(j+1)])                 if ( file_exists(temp) ){                     precache_sound(WordWavCombo[i][TOK_LENGTH*(j+1)])                 }             }else if ( strlen(Join_wavs[TOK_LENGTH*j]) && i == MAX_KEYWORDS ){                 new temp[128]                 format(temp,127,"sound/%s",Join_wavs[TOK_LENGTH*j])                 if ( file_exists(temp) ){                     precache_sound(Join_wavs[TOK_LENGTH*j])                 }             }else if ( strlen(Exit_wavs[TOK_LENGTH*j]) && i == MAX_KEYWORDS + 1 ){                 new temp[128]                 format(temp,127,"sound/%s",Exit_wavs[TOK_LENGTH*j])                 if ( file_exists(temp) ){                     precache_sound(Exit_wavs[TOK_LENGTH*j])                 }             }         }     } }

ancient1 10-02-2004 16:34

No the sounds not playing is not the sample rate, I allready knew about that so they are all the same...

It's just a irregular bug, it stops playing sounds for while and then resumes, nothing in logs :?

For example:

I may say hello, which responds with the wav combo hello.wav

Some other sounds may play and then my next Hello might be nothing played? it's irregular, but there is a bug there somewhere me thinks, thats why I though it might be the size of the wav that was causing it? It happens more after large .wavs...

Ancient

karlos 10-02-2004 19:55

hotfix 1.1.2:
- fixed bug where dead players could not hear sounds

i think this was cause of a bug where dead players could not hear anything except snd_split was on :roll:
hope the hotfix fixes it

ancient1 10-02-2004 21:41

Players in spec dont either...

Also sometimes you can hear the sounds, some times you cant...

Go play here for a hour or so to see what I mean!!

80.190.246.176:27015 Royston Vasey

Ancient

karlos 10-03-2004 09:41

i just playe on your server and yes they r stopping to play
but it rather seems that the whole plugins stoppped/paused cause sound quota is not checked and amx_sound_help cant be use neither

check if it paused when sounds not working

ps: with v1.1.2 specs and dead player can

scout121 10-03-2004 12:09

ummm does any1 elses randomly play a sound without using the command? cuz mine does it.

i am just using this pluggin so the clients can dl the .wav, i only want admins to be able to use the sounds.

karlos 10-03-2004 12:45

1) does it play a sound with out saying anything or not saying the specific command?
a) check EXACT_MATCH, if set to 0 u can use the command within the a sentence (eg: cmd = hallo, if exact_match 1 and sentence = hallo all nothing is played but when exact_match 0 then it is)
b) when client connect or disconnect a sound is played

2) admins only can use
yes i can implement this in next version

currently u can do it by editing it
go to func " QuotaExceeded(id){ " (at line 926)
below add
Code:
if ( !(get_user_flags(id)&ACCESS_ADMIN) ) // here add the access needed to be allowed to play         return 1

scout121 10-03-2004 13:51

that confused me a little bit, i just want to use this pluggin so clients can dl .wavs from me.

so how do i stop the sounds playing when clients connect or disconnect?

karlos 10-03-2004 14:08

playing sound when client connects and discon is auto

this one allows players to use special words in chat and then a spesific sound is played
as players need that sound it has a sound download implemented

when u want a plugin that downloads sounds and is not playing any sound this is the wrong plugin

scout121 10-03-2004 14:43

ok i look for another 1

ancient1 10-03-2004 15:21

Latest version does not work for some reason :( Nothing heard at all, everything lists in console and the plugin is not paused...

I have rolled back to the previous version, as that one works 80% of the time ;)

Ancient

-=|JFH|=-cLaD 10-04-2004 00:41

i had the same problem, make sure the snd-list.cfg is in the amxmodx\config\snd-list.cfg and in your console type amx_sound 1. then i did amx_sound_reload snd-list.cfg

ancient1 10-04-2004 13:19

After much head scratching, sometimes it will sometimes it wont etc etc I have narrowed it down to bots!!

I think the plugin is causing a error in the engine module or somewhere as its trying to play a sound on a fake client, this is the cause of the problem I think...

Removing the bots makes the plugin work flawlessly :?

Over too you ;)

Ancient

holzberg 10-04-2004 14:33

WOw, you all are having all this trouble and I have not had any trouble with psychosounds at all.

I ported it to amxx from amx. All you do is change the #include <amxmod> to #include<amxmodx>. Then there is a function called strtonum in amx that has changed to str_to_num in amxx.

Then I changed the dir from addons/amx to addons/amxmodx/configs in the sma as well.


All times are GMT -4. The time now is 10:19.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.