AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Death Sound (https://forums.alliedmods.net/showthread.php?t=103034)

Keksmampfer 09-08-2009 13:09

Death Sound
 
3 Attachment(s)
Death Sound
This is my first Plugin.

Description:

This plugin plays a random sound to specific group of players or play a sound to a specific group of players on a specific map position.

The plugin adds the sounds to the DownloadTable and prechaches them.

Features:
Full control about who can here sounds.
Emit on map or play directly to a player.
Player on / off option.
Force deathsounds.
Announcement how to switch on / off.
...

Installation:


  1. Download and paste the deathsound.smx to /sourcemod/plugins/
  2. On updating delet "cfg/sourcemod/plugin.deathsound.cfg"
  3. Put the deathsound.txt into your "/sourcemod/configs" folder.
  4. Load the plugin with a mapchange or "sm plugins load deathsound".
  5. Edit the configfile"cfg/sourcemod/plugin.deathsound.cfg" and the soundlist "/sourcemod/configs/deathsound.txt". 10 sounds are maximum.
  6. Upload the sounds to the server and optionally to the fast download server.=)
  7. Reload the plugin with a mapchange or "sm plugins reload deathsound".
Important CVAR's:

sm_deathsound_playto: summ up the values of the groups (e.g: All playing players = 12 (4+8))
Groups:
+1 :the victim
+2 :the attacker
+4 :the team of victim
+8 :the team of the attacker
+16 :all dead players (i think this includes spectators)
+32 :all alive players

sm_deathsound_emit:
1: Emit a sound on the map at the position where a plaer died
0: Play all sounds diret to the players.

...

Changelog:
Code:

* V0.5.3
* Fixed bug with the spamming announce
* Fixed bug with on/ off option
* Fixed logic bug -.--.-.-.-.-.-.-.-.-.-.-.-.-
* Code optimization
*
* V0.5
* Changed cvar soundlist to keyvaluesoundlist
* Added more options for sm_deathsound_playto
* Added On/off option for Players
* Added announce
* +Cvar to control the announce
* +Cvar to emit a sound on the map or play a sound direct to a player
* +Cvar to disable the player on / off option
*
* V0.4.2
* Added some code
*
* V0.4
* +Cvar to control who can hear sound
* +Cvar to control which sound the players hear
*
* V0.3.1
* Fixed bug with client index
*
* V0.3
* +cvar plugin on/off: sm_deathsound_enable
* +cvar soundlist: sm_deathsound_soundlist
* +autoconfigfile:cfg/sourcemod/plugin.deathsound.cfg
* Recoded the [CSS]RoundSound part.
*
* V 0.2:
* Added singel soundfile check.
*
* V 0.1:
* Basic Plugin, based on [CSS]RoundSound.

To Do:
*Admin executes sound on player
*The settingsmenu
*Translationfile.
*Option to disable the standard sound

Credits:
I used [CSS]RoundSound for help.
THX to Black Haze.

I'm searching for good sounds. Please help me.

berni 09-11-2009 14:07

Re: Death Sound
 
Missing something eh ?

Keksmampfer 09-11-2009 15:52

Re: Death Sound
 
ahh sry i forgot

Black Haze 09-14-2009 20:19

Re: Death Sound
 
Placed the sounds in cstrike/sounds/bwdeath/death1.wav > death6.wav.
Config line is: sm_deathsound_soundlist "bwdeath/death1.wav;bwdeath/death2.wav;bwdeath/death3.wav;bwdeath/death4.wav;bwdeath/death5.wav;bwdeath/death6.wav"

Still, doesn't work. Could you be a tad more precise about where to put the files? Plugin is loaded btw, and the default files are played.

Also, do other people hear the deathsounds, or only the dying? (And if so, could you make it so everyone hears the sound, with a cvar or something?)

Keksmampfer 09-17-2009 17:27

Re: Death Sound
 
Look first post. I think i added all the features and uploaded an example.
Can you test ist?
It works fine on my dedicated server, but only with one person :).

Black Haze 09-20-2009 13:46

Re: Death Sound
 
Will not play, again :( Even with the example. Plugin is loaded...
Btw when I looked tru the code it seems as if you just play the sound to every player in the game, no matter where they are on the map. How about spawning an env_sound temporarily on the coords where the player died, and playing sound tru that?

Keksmampfer 09-24-2009 12:59

Death Sound
 
Hi,
i dont know why, but the soundlist loads at the 2nd reload?!?!.
I think i should use key values. maybe this fixes the problem.
No, the right player heare the sound , i checked that.

Black Haze 09-25-2009 10:42

Re: Death Sound
 
Yes the players DO hear the sound, but it's played from their perspective.
For instance, if you die, and I'm on the other end of the map, I hear you die like you're next to me, as opposed to what it should be, from a distance. This is because you let each client play the sound, instead of just emitting one sound from the point where the player died.

Keksmampfer 10-18-2009 15:51

Re: Death Sound
 
* V0.5
* Changed cvar soundlist to keyvaluesoundlist
* Added more options for sm_deathsound_playto
* Added On/off option for Players
* Added announce
* +Cvar to control the announce
* +Cvar to emit a sound on the map or play a sound direct to a player
* +Cvar to disable the player on / off option

If you find bugs, tell me ;)

StrikerMan780 10-19-2009 04:15

Re: Death Sound
 
I add the sounds, but it keeps on saying it cannot find them. Oh, by the way, it might be a good idea to add a CVAR to disable HL2: DM Default death sounds in favor of the ones provided by the plugin.

Keksmampfer 10-19-2009 08:36

Re: Death Sound
 
Are the soundfiles in the correct folder on the server? I'll think about disabling the standard deathsound, but i can't promise anything.

Keksmampfer 10-19-2009 11:08

Re: Death Sound
 
Update:
Fixed bug with on / off option.

StrikerMan780 10-19-2009 14:19

Re: Death Sound
 
Yeah, soundfiles were in the correct location. /sounds/misc. I could get it to work if I copied the files to that folder, but if I copied them to the Dedicated Server with an sv_downloadurl, even if the sounds were on both, it would refuse to transfer the files to connecting players, and for some reason, despite being in all the right locations, the Download Table kept saying they were missing. Kinda strange. Sound not being set up for precaching/download correctly?

In light of all that though, it is a good plugin. Keep up the good work.

Black Haze 10-20-2009 17:57

Re: Death Sound
 
Looks awesome, gonna test that first thing tomorrow!

Black Haze 10-21-2009 03:31

Re: Death Sound
 
Just to give you some ideas if you're thinking bout expanding this:
Try making conditions for played sounds, for instance different sounds for headshots, when someone falls to death, when someone has done more then a set amount of damage to kill someone, or even depending on with what weapon you kill em.

Keksmampfer 10-21-2009 10:35

Re: Death Sound
 
Thx, mhn, I already have plans in this direction.




//update: fixed bug with the spamming announce

Black Haze 10-21-2009 18:19

Re: Death Sound
 
Doesn't play :(
It does download the sounds, still never plays em.

Config:
Quote:

// This file was auto-generated by SourceMod (v1.2.3)
// ConVars for plugin "deathsound.smx"


// 1 - Allows the player to turn off his / her deathsounds
// 0 - Doesn't allows the player to turn off his / her deathsounds
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_deathsound_allow_disable "0"

// 0 - No Announce
// 1 - 1 Every 45 seconds the announce: Use /deathsound or !deathsound to turn on / off the deathsound.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_deathsound_announce "0"

// 1 - Emits a sound at the position of the daed player
// 0 - Plays the sound directly to the players
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_deathsound_emit "1"

// 1 - Turn the plugin On
// 0 - Turn the plugin OFF
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_deathsound_enable "1"

// Play a sound to:
// +1 :the dieing player
// +2 :the attacker
// +4 :the team of the dieing player
// +8 :the team of the attacker
// +16 :all dead players
// +32 :all living players
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "63.000000"
sm_deathsound_playto "63"

// 1 - Everyone hears the same sound
// 0 - Everyone hears a different sound
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_deathsound_samesound "1"

// 1 - Stops the sound bevore
// 0 - don't stop
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_deathsound_stoplastsound "0"
No errors in both client and server console.

Keksmampfer 10-22-2009 02:34

Re: Death Sound
 
If a bot has the clientid 1 and sm_deathsound_samesound is on, the plugin will play no sound. I fixed it, it was a logic mistake. :cry:

//Update:
* Fixed logic bug -.--.-.-.-.-.-.-.-.-.-.-.-.-
* Code optimization

Black Haze 10-22-2009 06:15

Re: Death Sound
 
This now works, and can only be described as brilliant :D
Click to connect to my server it runs on
Got one more request, although I'm not too sure it's possible:
When people die their death sound is played in the place they died, as requested. Would it be possible to move the sound with the flying body? (the bodies on our server fly all over the place when dead).

Thanks for a brilliant plugin!

rezonans 10-30-2009 18:59

Re: Death Sound
 
will tell me what could be a problem: on the server Windows everything works fine, on linux, when loading a plugin gives an error. deathsound.smx failed to load: Unable to open file ???? :cry:

APACHE 11-01-2009 15:45

Re: Death Sound
 
Will this work for AOC?

Black Haze 11-02-2009 06:46

Re: Death Sound
 
What is AOC and is it a source mod?

usla 01-19-2010 10:26

Re: Death Sound
 
can the trigger of the sound be modified by a weapon exp like a knife :D ?

tgp1994 04-12-2010 22:08

Re: Death Sound
 
Just installed DeathSound onto to my Zombie Master server. Added my own sounds, added them in the sound list file. Files show as loading OK in the console, and they download to the clients. However, none of my deathsounds are played when anyone dies. Here is my config file:

Code:

// This file was auto-generated by SourceMod (v1.3.1)
// ConVars for plugin "deathsound.smx"


// 1 - Allows the player to turn off his / her deathsounds
// 0 - Doesn't allows the player to turn off his / her deathsounds
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_deathsound_allow_disable "1"

// 0 - No Announce
// 1 - 1 Every 45 seconds the announce: Type /deathsound or !deathsound to turn on / off the deathsound.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_deathsound_announce "1"

// 1 - Emits a sound at the position of the daed player
// 0 - Plays the sound directly to the players
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_deathsound_emit "1"

// 1 - Turn the plugin On
// 0 - Turn the plugin OFF
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_deathsound_enable "1"

// Play a sound to:
//  +1 :the dieing player
//  +2 :the attacker
//  +4 :the team of the dieing player
//  +8 :the team of the attacker
//  +16 :all dead players
//  +32 :all alive players
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "63.000000"
sm_deathsound_playto "63"

// 1 - Everyone hears the same sound
// 0 - Everyone hears a different sound
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_deathsound_samesound "1"

// 1 - Stops the sound bevore
// 0 - don't stop
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_deathsound_stoplastsound "0"


FBD 07-06-2010 21:59

Re: Death Sound
 
i love this plugin, i have it play hide and seek (more commonly known as dear sister) i just wish i could have the host_timescale to work w/o cheats on, i would love to have this plugin with the critical slowdown plugin :D
im currently also adding die die die my darling >: D anyways,
great plugin, i have found no flaw in it yet (except with 30 bots w/ instant kill and instant respawn and play to all players, = EAR RAPE)

GrO 09-30-2010 08:24

Re: Death Sound
 
Are there any consequences, if I'd change the 10 max sounds limit to some higher values?

Black Haze 09-30-2010 09:43

Re: Death Sound
 
Quote:

Originally Posted by GrO (Post 1311973)
Are there any consequences, if I'd change the 10 max sounds limit to some higher values?

Lech Kaczynski will rise from the grave to haunt you as a zombie is my guess.

GrO 09-30-2010 18:18

Re: Death Sound
 
Quote:

Originally Posted by Black Haze (Post 1312026)
Lech Kaczynski will rise from the grave to haunt you as a zombie is my guess.

Is there any point to post such funny replies? People, like You should be banned for 0 minutes.

Black Haze 10-01-2010 09:54

Re: Death Sound
 
Quote:

Originally Posted by GrO (Post 1312522)
Is there any point to post such funny replies? People, like You should be banned for 0 minutes.

:cry:

sinblaster 10-03-2010 06:02

Re: Death Sound
 
Quote:

Originally Posted by Black Haze (Post 1313029)
:cry:

don't worry Haze I thought it was lolz

bellabeta 08-07-2011 23:37

Re: Death Sound
 
I really wished all these awesome addons/plugins/mods were kept up to date. It's incredible how many people still play CSS, such as myself.

Right now, it looks like this plugin doesn't work properly, with the new Valve Patches, but in some ways it still does.

While playing, I've noticed that this sounds only works if a certain player kills me. Through the entire round, the sounds will not work if everyone kills me. Just this one person. The same person, every time. Hopefully, if the creator of this isn't too busy. Maybe an update could be in order?

Suggestions:
Expand potential and call this "Event Sounds."

[Death Sound]
-Various sounds that will execute without a 5 meter radius of the player that died.
-Sounds that can be assigned to players based on the skin they're using.

[Jump Sound]
-A sound that plays whenever the +jump command is executed within a 10meter radius of the player executing the command.
-Sounds that can be assigned to players based on the skin they're using.

[Hit Sound]
-A sound that plays exclusively to the player causing damage to another player.

Maybe have these sounds override the current sounds being used in CSS, so that there aren't two sounds playing at the same time. Maybe have the CSS version of these sounds turned off.

More ideas to come :D

srvmil 01-12-2018 01:13

Re: Death Sound
 
Tried this on CSGO, doesn't work. I know this was for CSS as the OP posted it in 2009.

Can anyone make this work for CSGO as this is what I'm after.

nguyenbaodanh 03-13-2018 07:41

Re: Death Sound
 
Need this too for csgo :)


All times are GMT -4. The time now is 11:49.

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