Raised This Month: $32 Target: $400
 8% 

DoD "Missing Sounds" Plug-in


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Day of Defeat        Category:   Fun Stuff        Approver:   SidLuke (11)
Trp. Jed
Member
Join Date: Aug 2004
Old 08-23-2004 , 19:42   DoD "Missing Sounds" Plug-in
Reply With Quote #1

Wrote this after some people on the DoD forums commented about the missing voice commands that seemed to get taken out recently. The WAV files still existed in the install, just not the ability to use them.

Simple server side plug-in re-enables them and adds some others - classics such as "Medic!" and "Drop your weapons!"

Sounds are transmitted via the normal voice channel so they fade with distance. There is also a say_team text message shown too. Players can only use the commands when their "alive" and it includes basic spam blocking. It also detects which side your on and if your British or US.

My first attempt at an AMXX plugin so its probably NOT that sleek and efficient - forgive me.

Code:
/* AMX Mod script.
*
* AMXX DoD Missing Sounds
*  by Trp. Jed
*
* Re-instates some of the "missing" voice commands from earlier
* versions of DoD. Autodetects if player if allies or axis and
* plays correct language. cvar sets which allied voice to use.
*
* Settings:
*  amx_dodmissingsounds 0/1 - enable the missing sounds (put in server.cfg)
* 
* Usage:
*  Bind a key to one of the following commands:
*
*  voice_coverflanks
*  voice_defendobjective	(British only)
*  voice_defendposition		(British only)
*  voice_dropguns
*  voice_firmleft
*  voice_firmright
*  voice_medic
*  voice_moveout
*  voice_moveuppiat		(British only)
*  voice_prepare
*  voice_spreadout
*  voice_tankahead
*  voice_takecover
*  voice_takeflank
*  voice_takeobjective		(British only)
*
*
* Example:
*  bind "o" "voice_medic"
* 
*
* This file is provided as is (no warranties).
*
*/
Just bind a key to the command you want, or as an alternative, paste the following into a text file called "commandmenu.txt" and place it in your "day of defeat\dod" folder. You can then access the sounds via the command menu (which I think defaults to X)

Code:
"1" "HELP"
{
	CUSTOM		"1" "SERVER INFO"		"!SERVERINFO"
	CUSTOM		"2" "MAP DESCRIPTION"		"!MAPBRIEFING"
}

"2" "VOICE MESSAGES 1"
{
	"1" 	"'Move out'"		"voice_attack"
	"2"	"'Fall Back'"		"voice_fallback"
	"3"	"'Covering Fire'"	"voice_cover"
	"4" 	"'I need backup'"	"voice_backup"
	"5" 	"'Hold this position'"	"voice_hold"
}

"3" "VOICE MESSAGES 2"
{
	"1" "'Yes Sir!'"		"voice_yessir"
	"2" "'Flank Left!'"		"voice_left"
	"3" "'Flamk Right!'"		"voice_right"
	"4" "'I need ammo'"		"voice_needammo"
	"5" "'Sniper!'"			"voice_sniper"
	"6" "'Grenade!'"		"voice_grenade"
}

"4" "VOICE MESSAGES 3"
{
	"1" "'Prepare to attack!'"	"voice_prepare"
	"2" "'Move Out!'"		"voice_moveout"
	"3" "'Cover Flanks!!'"		"voice_coverflanks"
	"4" "'Take Flanks!'"		"voice_takeflank"
	"5" "'Left!'"			"voice_firmleft"
	"6" "'Right!'"		"voice_firmright"
}

"5" "VOICE MESSAGES 4"
{
	"1" "'Spreadout!'"		"voice_spreadout"
	"2" "'Drop your weapons!'"	"voice_dropguns"
	"3" "'Tank Ahead!'"		"voice_tankahead"
	"4" "'Take Cover'"		"voice_takecover"
	"5" "'Medic!'"			"voice_medic"

}

"6" "BRIT VOICE MESSAGES"
{
	"1" "'Defend Objective!'"	"voice_defendobjective"
	"2" "'Defend Position!'"	"voice_defendposition"
	"3" "'Take Objective!'"		"voice_takeobjective"
	"4" "'Move up the PIAT!'"	"voice_moveuppiat"


}

"7" "HAND SIGNALS 1"
{
	"1" "'Stick Together'"		"signal_sticktogether"
	"2" "'Fall Back'"		"signal_fallback"
	"3" "'No Sir'"			"signal_no"
	"4" "'Yes Sir'"			"signal_yes"
	"5" "'Sniper!'"			"signal_sniper"
	"6" "'Need Backup'"		"signal_backup"
	"7" "'Right'"			"signal_enemyright"
	"8" "'Left'"			"signal_enemyleft"
}

"8" "HAND SIGNALS 2"
{
	"1" "'Flank Left'"		"signal_flankleft"
	"2" "'Flank Right'"		"signal_flankright"
	"3" "'Move Out'"		"signal_moveout"
	"4" "'Area Clear'"		"signal_areaclear"
	"5" "'Covering Fire'"		"signal_coveringfire"
	"6" "'Hold Position'"		"signal_holdposition"
	"7" "'Enemy Ahead'"		"signal_enemyspotted"
	"8" "'Grenade!'"		"signal_grenade"
}
Attached Files
File Type: zip amxx_dod_sounds.zip (6.3 KB, 2054 views)
File Type: sma Get Plugin or Get Source (amxx_dod_sounds.sma - 3126 views - 12.6 KB)
Trp. Jed is offline
Jedi
Member
Join Date: Mar 2004
Location: Houston, TX
Old 08-24-2004 , 19:47  
Reply With Quote #2

Thanks Jed - plugin works great.

Now if we could just get bleeding back!
__________________
Jedi is offline
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 08-25-2004 , 11:35  
Reply With Quote #3

Quote:
Originally Posted by Jedi
Now if we could just get bleeding back!
Do you really want it ? I've got a test version somewhere and I forgot about it. I've got one big problem. I can't hide weapon while bandaging...
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
darkdog
Junior Member
Join Date: May 2004
Old 08-27-2004 , 14:06  
Reply With Quote #4

I have the plugin loaded..its loaded on amxx list but it acts as the plugin isnt even there...It says unknown command to all these voice commands even with amx_dodmissingsounds set to 1 in my server.cfg :\ I dont really know what else it could be...

Also..
I'd love the bandage plugin Sid..!
darkdog is offline
Send a message via AIM to darkdog
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 08-28-2004 , 12:14  
Reply With Quote #5

@Trp. Jed
You should add
Code:
return PLUGIN_HANDLED
to all client command functions

ex.
Code:
// voice_coverflanks (all teams)
//
public dodvoice_cflanks(id) {
	new cTeam[16]
	get_user_info(id,"team",cTeam,15)

	if ( can_play(id) )
	{
		if (equal(cTeam, "allies")) {
			if (is_brit == 1) {
				emit_sound(id,CHAN_VOICE, "player/britcoverflanks.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
			} else {
				emit_sound(id,CHAN_VOICE, "player/uscoverflanks.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
			}
		} else {
			emit_sound(id,CHAN_VOICE, "player/gercoverflanks.wav.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
		}
		client_cmd(id,"say_team Cover the flanks!")
	}
	return PLUGIN_HANDLED
}
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
Trp. Jed
Member
Join Date: Aug 2004
Old 08-28-2004 , 14:57  
Reply With Quote #6

Thanks Sid, I'll add it in. I confess I wasnt 100% sure on what the return constants meant exactly.
Trp. Jed is offline
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 08-28-2004 , 16:20  
Reply With Quote #7

player/usleft.wav.wav
player/usright.wav.wav

typo ??
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
Trp. Jed
Member
Join Date: Aug 2004
Old 08-29-2004 , 03:39  
Reply With Quote #8

Eh? Where the heck did those come from? There not in the version on my desktop. *mind boggles*

Fixed
Trp. Jed is offline
pendragon
Senior Member
Join Date: Mar 2004
Location: In a bubble
Old 12-02-2004 , 15:20  
Reply With Quote #9

Jed...

first of all - thank you for this plugin.
Second my ?.........
Would you be willing to hardcode the menu items into the code for this plugin?
The reason I ask is that it would be cool to be able to add a menu command for this plugin to the customenuitems.cfg file so that people wouldnt have to create so many binds just for voices.

Thanks again.
__________________
pendragon is offline
Send a message via ICQ to pendragon
WW2
Member
Join Date: May 2005
Location: USA, WA, In a tree
Old 07-23-2006 , 17:10   Re: DoD "Missing Sounds" Plug-in
Reply With Quote #10

Does this work anymore with 1.70, cant seem to get the sounds to play?
__________________
[img]http://img149.**************/img149/825/forumsig7tr.jpg[/img]
WW2 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:16.


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