Raised This Month: $12 Target: $400
 3% 

DoD Shell Shock v2.0


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Day of Defeat        Category:   Gameplay        Approver:   Hawk552 (427)
diamond-optic
Veteran Member
Join Date: May 2005
Location: Upstate New York
Old 11-20-2006 , 07:57   DoD Shell Shock v2.0
Reply With Quote #1

DoD Shell Shock
- Version 2.0
- 07.29.2009

Credits:
Quote:
- Original Code by v3x (he_damage_effect v0.2)
- Ported to DoD by diamond-optic
- cadav0r: new volume fx methods and various other fixes
- WARDOG: new ringing sound
- Emp`: suggestions on cleaning up some bits and pieces
- Wilson [29th ID]: PStatus method of catching player spawn
- TatsuSaisei: Fix for Wilson's PStatus method
Information:
Quote:
- When you take damage from the allowed weapons,
You will experiecne a random selection or a
combination of various effects.. For example, your
screen might be distorted, your sound volume might
decrease for a few seconds before it returns to
normal. There's also a chance for a ringing sound
in your ears, along with little floating dots all
around you...There is also an effect that changes
the way everything sounds to you (pitch shift/echo/etc).
You may even drop your weapon/object/ammo or fall down prone.

- CVARs to pick which weapons cause effects
- Minimum damage required controllable for each one of the effects
- Each effect has options to control specific aspects of that effect

- File consistency is enforced on the shellshock ring sound to
prevent people from replacing it with a blank sound file

- Server List: Servers: http://www.game-monitor.com/search.p...ellshock_stats
Commands:
Quote:
dod_shellshock_start <nick/#userid> <damage amount> //Shell Shock a client
dod_shellshock_stop <nick/#userid> //Stops Shell Shock on a client
CVARs:
PHP Code:
dod_shellshock "1"         //Turn on(1)/off(0)

//weapons that cause effects
dod_shellshock_wpn_grenades "1"
dod_shellshock_wpn_rockets "1"
dod_shellshock_wpn_mortars "1"
dod_shellshock_wpn_knives "0"
dod_shellshock_wpn_spades "0"
dod_shellshock_wpn_buttstocks "0"
dod_shellshock_wpn_bayonets "0" 
Compiler Defines:
PHP Code:
SETTING_WARN            2    //Inconsistent file warning setting
                        //    0 = say nothing
                        //    1 = tell admins
                        //    2 = tell public

SETTING_WARNACTION        2    //Inconsistent file action setting
                        //    0 = do nothing
                        //    1 = kick
                        //    2 = ban

SETTING_FILEBANTIME        15    //Inconsistent file ban action length

SETTING_FILEAMXBANS        0    //Inconsistent file ban action amxbans support
                        //    0 = off
                        //    1 = on
                        //    2 = on, alternate syntax

SETTING_FADE            1     //Turn on(1)/off(0) screen fade effect
SETTING_FADEDMG        30    //Sets the minimum damage required
SETTING_FADEALPHA        100    //Sets the defualt fade alpha level
SETTING_FADEINC        1    //Turn on(1)/off(0) increase of fade alpha level
SETTING_FADEINCDMG        2    //Amount of damage for each step of fade alpha level increase
SETTING_FADEINCAMT        5    //Fade alpha level increase amount per step 

SETTING_SHAKE            1    //Turn on(1)/off(0) screen shake effect
SETTING_SHAKEDMG        20    //Sets the minimum damage required

SETTING_VECTOR            1    //Turn on(1)/off(0) vector effect
SETTING_VECTORDMG        50    //Sets the minimum damage required
SETTING_VECTORAMT        60.0    //Sets the min/max angle of change

SETTING_VOLUME            1    //Turn on(1)/off(0) short volume loss effect
SETTING_VOLUMEDMG        65    //Sets the minimum damage required
SETTING_VOLUMETIME1        10    //How long you lose volume (10ths of a second)
SETTING_VOLUMETIME2        10    //Delay between each volume increase step (10ths of a second)
SETTING_VOLUMEINC        1    //Turn on(1)/off(0) increase of volume loss time
SETTING_VOLUMEINCDMG    10    //Amount of damage for each step of vol. loss increase
SETTING_VOLUMEINCTIME    5    //Volume loss increase time per step (10ths of a second) 

SETTING_RING            1    //Turn on(1)/off(0) ringing effect
SETTING_RINGDMG        80    //Sets the minimum damage required

SETTING_FOV            1    //Turn on(1)/off(0) fov effect
SETTING_FOVDMG            85    //Sets the minimum damage required

SETTING_SOUND            1    //Turn on(1)/off(0) soundfx effect
SETTING_SOUNDDMG        60    //Sets the minimum damage required
SETTING_SOUNDTIME        10.0    //Sets how long the effect lasts (-1 = keep effect till client dies)

SETTING_DROP            1    //Turn on(1)/off(0) weapon drop effect
SETTING_DROPDMG        90    //Sets the minimum damage required

SETTING_PRONE            1    //Turn on(1)/off(0) forcing prone effect
SETTING_PRONEDMG        95    //Sets the minimum damage required

SETTING_PARTICLES        1    //Turn on(1)/off(0) particle effect (floating dots)
SETTING_PARTICLESDMG    20    //Sets the minimum damage required

SETTING_MAXPLAYERS        32    //Set to the maximum # of players (slot count) 
Extra:
Quote:
Put the "dod_shellshock_ring.mp3" in /dod/sound/misc/

If you change the sound file, DO NOT use the same name,
change the #define RINGSOUND instead!!!
Change Log:
Code:
- 05.01.2006 Version 0.1
	Initial port of v3x's "he_damage_effect v0.2"
	Added cvar to set min. dmg required
	Added Rockets as well as grenades

- 05.03.2006 Version 0.2
	Added Garand & K43 buttstocks

- 05.05.2006 Version 0.3
	Added CVAR for buttstocks
	Renamed to DoD Shell Shock

- 05.06.2006 Version 0.4
	Removed buttstocks till I do it a better way
	Changed from MSG_ONE to MSG_ONE_UNRELIABLE

- 05.10.2006 Version 0.5
	Added CVARs for fade & shake (code from cadav0r)
	Added CVAR for volume

- 05.12.2006 Version 0.6
	CVAR query bug fixed (thanks cadav0r)
	New method for volume effect (thanks cadav0r)
	Fixed volume staying at 0.0 bug

- 05.15.2006 Version 0.7
	Another fix for CVAR query problem
	Added ringing sound MP3 (still plays during volume effect)
	Added CVAR for ringing effect
	Added FOV effect (defualts to 0 as im not satisfied with it yet)

- 05.18.2006 Version 0.7b
	Removed global damage cvar and added one for each effect

- 05.22.2006 Version 0.7c
	Fixed run-time error
	Adjusted a few random things...

- 05.24.2006 Version 0.7d
	Fixed 2 small errors becuase of my stupidity (thanks cadav0r)

- 06.09.2006 Version 0.8
	Added CVAR for how long you lose your volume
	Added CVAR for delay between each volume increase step (thanks cadav0r)
	New 'ringing' sound (thanks WARDOG)
	Adjusted ScreenFade & ScreenShake message variables

- 07.06.2006 Version 0.9
	Replaced ENGINE module with FAKEMETA module
	Fixed volume effect for multiple nade hits (thanks cadav0r)
	Added increasing of volume loss time depending on dmg (thanks cadav0r)
	Added CVAR for setting the fade effect's defualt alpha level
	Added increasing of fade alpha level depending on dmg (cadav0r's method)
	Added 4 CVARs to control vector effect settings
	Did some more work on the FOV effect, a little bit more satisfied with it

- 07.09.2006 Version 0.9b
	Removed FUN module

- 07.14.2006 Version 0.9c
	Fixed "Missing RIFF/WAVE chunk" console message

- 08.05.2006 Version 0.9d
	Fixed possible problem with ring sound not playing (thanks KidTwisted)
	Added RINGSOUND define to make it easy to use a different file
	Incase the volume global doesnt get set.. it defualts to 1.0
	Cleaned up code a bit...

- 08.28.2006 Version 1.0
	Added mortars, knives, spades, buttstocks, and bayonets
	Added CVARs to control which weapons cause the effect
	Changed some returns

- 09.21.2006 Version 1.1
	Added public cvar for stats tracking

- 12.16.2006 Version 1.2
	Cleaned up a bunch of things (thanks Emp`)

- 03.17.2007 Version 1.3
	Cleaned up some more things thru the code
	Changed the default values for some of the cvars
	Now the effects will stop if you die
	Improved the effect tasks
	Added a new feature: sfx (changes the way everything you hear sounds)

- 03.19.2007 Version 1.3b
	Fixed a typo in the CVAR comment section
	More simple way to stop all the effects at once
	Tasks are now removed on client disconnect
	Changed volume cvar query task from 10sec to 8sec
	Removed some plugin active checks (avoids problems when turning it on mid-game)
	Added RoundState checks

- 03.20.2007 Version 1.3c
	Removed an extra cvar (dod_shellshock_sfx_stay)
	Fixed the sfx effect time stuff

- 06.13.2007 Version 1.4
	Changed the way the cvar query is done (first time client spawns)
	Added round draws to roundstate check
	Removed some code in the roundstate function
	Added drop weapon effect
	Added force prone effect
	Added 'particle' effect
	Few minor code changes/fixes
	Replaced high & low vector CVARs with one single new CVAR

- 07.29.2009 Version 2.0
	Added cvar query for client's room_type setting
	Improved code for reseting sfx effect
	Replaced spawn forward with HamSandwich
	Added commands to force/stop shell shock on a player (can be called by other plugins)
	Added file consistency on the shellshock sound
	Renamed the sound file to start fresh for the file consistency
	Adjusted some default times
	Another attempt at fixing the 0 volume issue
	Replaced DoDx death forward with HamSandwich
	Changed alot of the CVARs to compiler defines
	Improved task handling
	Various code improvements
	Added compiler define for setting max players
Attached Files
File Type: sma Get Plugin or Get Source (dod_shellshock.sma - 1815 views - 26.8 KB)
File Type: zip dod_shellshock_ring.zip (60.8 KB, 610 views)
__________________

Last edited by diamond-optic; 07-29-2009 at 17:48. Reason: update to 2.0
diamond-optic is offline
Send a message via AIM to diamond-optic
The Specialist
BANNED
Join Date: Nov 2006
Old 11-20-2006 , 08:12   Re: DoD Shell Shock v1.1
Reply With Quote #2

nice one , gj . Looks interesting . I think i played this on cz before (the origional version) . ++ karma
The Specialist is offline
Send a message via AIM to The Specialist
Xtreme-Coder
Member
Join Date: Oct 2006
Location: Scripting Amxx
Old 11-24-2006 , 10:27   Re: DoD Shell Shock v1.1
Reply With Quote #3

Good Job, Keep up the good work.
__________________
[IMG]http://img511.**************/img511/4757/xtremecoderfc8.png[/IMG]

|[ Current Projects ]|

Musical Jukebox [||||||||||||] (50 %)

Party Mod [||||||||||||] (20 %)
Xtreme-Coder is offline
=|[76AD]|= TatsuSaisei
Junior Member
Join Date: Nov 2006
Old 12-01-2006 , 03:59   Re: DoD Shell Shock v1.1
Reply With Quote #4

Awesome plugin !! Works like a charm !! Have used on a Linux machine and now a Windows machine.
=|[76AD]|= TatsuSaisei is offline
Send a message via AIM to =|[76AD]|= TatsuSaisei
Box Cutter
SourceMod Donor
Join Date: Dec 2006
Location: Arizona
Old 12-01-2006 , 12:20   Re: DoD Shell Shock v1.1
Reply With Quote #5

This plugin is definately one of the best additions to my server. Great Job!
Box Cutter is offline
tegu
Junior Member
Join Date: Sep 2006
Old 12-01-2006 , 21:55   Re: DoD Shell Shock v1.1
Reply With Quote #6

Absolutely one of the best plugins I have ever used on my server!! GJ!!
tegu is offline
ThomasNguyen
Senior Member
Join Date: May 2006
Old 12-01-2006 , 21:58   Re: DoD Shell Shock v1.1
Reply With Quote #7

Hmm, is this like how CS:S is when you get flashed?
__________________
ThomasNguyen is offline
diamond-optic
Veteran Member
Join Date: May 2005
Location: Upstate New York
Old 12-01-2006 , 22:14   Re: DoD Shell Shock v1.1
Reply With Quote #8

Quote:
Originally Posted by ThomasNguyen View Post
Hmm, is this like how CS:S is when you get flashed?
cant say as i dont play CSS.. but im willing to bet this is different then a flashbang effect.. and most likely nothing like an effect that can be produced thru the source engine :-( lol
__________________
diamond-optic is offline
Send a message via AIM to diamond-optic
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 12-14-2006 , 20:56   Re: DoD Shell Shock v1.1
Reply With Quote #9

Requesting that you clean up code such as
Code:
floatdiv(Float:set_time,Float:ten)
edit: also
Code:
		fVec[0] = random_float(get_pcvar_float(p_dod_shellshock_vector_low), get_pcvar_float(p_dod_shellshock_vector_high))
		fVec[1] = random_float(get_pcvar_float(p_dod_shellshock_vector_low), get_pcvar_float(p_dod_shellshock_vector_high))
		fVec[2] = random_float(get_pcvar_float(p_dod_shellshock_vector_low), get_pcvar_float(p_dod_shellshock_vector_high))
could be a lot better as
Code:
		new Float:vec_low = get_pcvar_float(p_dod_shellshock_vector_low)
		new Float:vec_high = get_pcvar_float(p_dod_shellshock_vector_high)
		fVec[0] = random_float(vec_low, vec_high)
		fVec[1] = random_float(vec_low, vec_high)
		fVec[2] = random_float(vec_low, vec_high)

and that you change some cvars to defines (not necessary, but suggested)

Last edited by Emp`; 12-14-2006 at 20:58.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
diamond-optic
Veteran Member
Join Date: May 2005
Location: Upstate New York
Old 12-14-2006 , 21:20   Re: DoD Shell Shock v1.1
Reply With Quote #10

good point.. pretty stupid of me to get the 2 same pcvars 3 times each.. :-P

as for the defines.. i originally had some of them as defines.. but having them as cvars makes it easier for ppl to adjust the settings to get an effect they like.. instead of setting defines, compiling, uploading, restarting, checking, then doing the whole thing over for each 'adjustment'


but im not totally sure what you mean about the floatdiv...

do you mean like take out the Float:ten and just put 10.0?
...because now that i look at it, it seems pretty stupid to do
Code:
ten = str_to_float("10")
and such.. when the number isnt going to change
__________________

Last edited by diamond-optic; 12-14-2006 at 21:28.
diamond-optic is offline
Send a message via AIM to diamond-optic
Reply


Thread Tools
Display Modes

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:04.


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