Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin

DoD FadeToBlack (v0.9)

by Firestorm · 2006-07-09 · 17 replies · 12590 views · 236 downloads

Read the thread (18 posts)

From the first post

// DESCRIPTION:
rn// ============
rn//
rn// Very simple little plugin which brings Fade-to-Black back
rn// to the public servers as it's only available in ClanMatch
rn// mode normally.
rn// Dead player's screen will (like the name already says)
rn// fade to black and he cannot see from where he was shot.
rn// a little bit of realism for your public server ;-)
rn
rn
//rn// USAGE:rn// ======rn//rn// cvars (for amxx.cfg):rn// ---------------------rn//rn// dod_fadetoblack_enabled <1/0> = enable/disable Fade-to-Black modern//rn// dod_fadetoblack_obeyimmunity <1/0> = enable/disable fading-immunityrn// for adminsrn//rn//rn// console commands:rn// -----------------rn//rn// amx_fadetoblack <1/0> = enable/disable Fade-to-Black modern//

rn
// CHANGELOG:rn// ==========rn//rn// - 16.03.2005 Version 0.5betarn// Initial Releasern//rn// - 17.03.2005 Version 0.6betarn// * added admin command "amx_dodftb" torn// enable/disable the pluginrn//rn// - 17.03.2005 Version 0.7betarn// * added cvar to exclude admins fromrn// fading to black after dieingrn//rn// - 12.08.2005 Version 0.8betarn// * fixed scoped snipers not being fadedrn//rn// - 02.07.2007 Version 0.9rn// - using pcvar system nowrn// - changed cvar "dod_fadetoblack" to "dod_fadetoblack_enabled"rn// - changed console command "amx_dodftb" to "amx_dodfadetoblack"rn// - added global tracking cvarrn//

Files

dod_fadetoblack.sma Plugin Source 5 KB 236 dl Download Compile

Archived builds from the server loose

These compiled builds sat loose in the server's script folder rather than attached to a post. They are matched to this release by comparing their decompiled Pawn against the source published above, so treat the attribution as strong but not certain. Versions come from the register_plugin() call recovered from the bytecode.

dod_fadetoblack.sma v0.8beta 4 KB Download Compile
dod_fadetoblack_142.sma v0.8beta 4 KB Download Compile

The thread

All 18 posts from 10 people on DoD FadeToBlack (v0.9), kept as they were written.

F Firestorm
started this thread
Posts: 31
Threads: 30
Joined: Jul 2006
07-09-2006, 09:47 AM #1

// DESCRIPTION:rn// ============rn//rn// Very simple little plugin which brings Fade-to-Black backrn// to the public servers as it's only available in ClanMatchrn// mode normally.rn// Dead player's screen will (like the name already says)rn// fade to black and he cannot see from where he was shot.rn// a little bit of realism for your public server ;-)rnrn

//rn// USAGE:rn// ======rn//rn// cvars (for amxx.cfg):rn// ---------------------rn//rn// dod_fadetoblack_enabled <1/0> = enable/disable Fade-to-Black modern//rn// dod_fadetoblack_obeyimmunity <1/0> = enable/disable fading-immunityrn// for adminsrn//rn//rn// console commands:rn// -----------------rn//rn// amx_fadetoblack <1/0> = enable/disable Fade-to-Black modern//
rn
// CHANGELOG:rn// ==========rn//rn// - 16.03.2005 Version 0.5betarn// Initial Releasern//rn// - 17.03.2005 Version 0.6betarn// * added admin command "amx_dodftb" torn// enable/disable the pluginrn//rn// - 17.03.2005 Version 0.7betarn// * added cvar to exclude admins fromrn// fading to black after dieingrn//rn// - 12.08.2005 Version 0.8betarn// * fixed scoped snipers not being fadedrn//rn// - 02.07.2007 Version 0.9rn// - using pcvar system nowrn// - changed cvar "dod_fadetoblack" to "dod_fadetoblack_enabled"rn// - changed console command "amx_dodftb" to "amx_dodfadetoblack"rn// - added global tracking cvarrn//
S spiff
posted here
Posts: 2
Threads: 1
Joined: May 2006
07-10-2006, 01:35 AM #2

Ughh i need this.

TigerMan4
posted here
Posts: 317
Threads: 37
Joined: Aug 2006
09-06-2006, 09:00 PM #3

will this work with deathfade running as well ? since deathfade makes admins with imunity see red ?

H Hood [10th MD]
posted here
Posts: 84
Threads: 7
Joined: Nov 2006
01-23-2007, 04:43 PM #4

Can we make this work for spectators as well, so anyone in spectator team has a black screen?

H Hood [10th MD]
posted here
Posts: 84
Threads: 7
Joined: Nov 2006
01-23-2007, 08:08 PM #5

Nevermind, it already does since you have to die to switch!rnThanks, this is superb - an excellent anti-ghosting tool for realism scrimmages!

R Rookie
posted here
Posts: 8
Threads: 0
Joined: Jan 2007
01-25-2007, 03:46 PM #6

tell how many players are in the server and do fade-to-black always when there are less than 4 players. but when more join, then use the values defined by the servers cfg files or admins.nnbe even better if there were a cvar to turn on and off this less than 4 player fade-to-black mode.nnRookie

H Hood [10th MD]
posted here
Posts: 84
Threads: 7
Joined: Nov 2006
02-26-2007, 02:14 AM #7

I have modified this code, and borrowed Tatsu's suggestion for the death fade to improve the plugin as follows:rnThe death fade now lasts MUCH longer, which is especially useful for this function I added:rnAnyone that joins the spectator team also gets the fade, and it lasts as long as seems possible, which is excellent.rnrnSo why this modification? Well - it prevents ghosting, this is especially useful during realisms. Everyone check it out, let me know if it needs to be fixed, etc.rnrn

#include <amxmodx>rn#include <amxmisc>rn#include <dodx>rnrnpublic plugin_init()rn{rn	register_plugin("DoD FadeToBlack","0.8beta","AMXX DoD Team")rn	register_statsfwd(XMF_DEATH)rn	register_concmd("amx_dodftb","cmdsetftb",ADMIN_CFG,"<1/0> - enable/disable DoD FadeToBlack")rn	register_cvar("dod_fadetoblack","0")rn	register_cvar("dod_fadetoblack_obeyimmunity","0")rn	register_event("TextMsg","specblack","a","1=3","2=#game_joined_team","4=Spectators")rn}	rnrnpublic plugin_modules()rn{rn	require_module("dodx")rn}rnrnpublic specblack()rn{rn	if(get_cvar_num("dod_fadetoblack")==1)rn	{rn		new username[32]rn		read_data(3,username,31)rn		new id = get_user_index(username)rn		set_task(0.1,"fade_to_black", id)rn		while(is_user_alive(id)==0)rn		{rn			set_task(20.0,"fade_to_black", id)rn		}rn	}rn	return PLUGIN_CONTINUErn}rnpublic client_death(killer,victim,wpnindex,hitplace,TK){	rn	if(get_cvar_num("dod_fadetoblack") == 1){rn		if((get_user_flags(victim)&ADMIN_IMMUNITY) && get_cvar_num("dod_fadetoblack_obeyimmunity") == 1){rn			return PLUGIN_CONTINUErn		}rn		set_task(0.1,"fade_to_black",victim)rn	}rn	return PLUGIN_CONTINUErn}rnrnpublic fade_to_black(victim){rn	new FadeToBlack = get_user_msgid("ScreenFade")rn	message_begin(MSG_ONE_UNRELIABLE,FadeToBlack,{0,0,0},victim)rn	write_short(  1<<13)rn	write_short(~0)rn	write_short( 1)rn	write_byte(0)rn	write_byte(0)rn	write_byte(0)rn	write_byte(255)rn	message_end()rn}rnrnpublic cmdsetftb(id,level,cid){rn	if (!cmd_access(id,level,cid,2)){rn		return PLUGIN_HANDLEDrn	}rn	new ftb_s[2]rn	read_argv(1,ftb_s,2)rn	new ftb = str_to_num(ftb_s)rn	if(ftb == 1){rn		if(get_cvar_num("dod_fadetoblack") == 1){rn			client_print(id,print_chat,"[AMXX] DoD FadeToBlack is already enabled.....")rn		}rn		else if (get_cvar_num("dod_fadetoblack") == 0){rn			set_cvar_num("dod_fadetoblack",1)rn			client_print(id,print_chat,"[AMXX] DoD FadeToBlack ENABLED.....")rn		}rn	}rn	else if(ftb == 0){rn		if(get_cvar_num("dod_fadetoblack") == 0){rn			client_print(id,print_chat,"[AMXX] DoD FadeToBlack is already disabled.....")rn		}rn		else if(get_cvar_num("dod_fadetoblack") == 1){rn			set_cvar_num("dod_fadetoblack",0)rn			client_print(id,print_chat,"[AMXX] DoD FadeToBlack DISABLED.....")rn		}rn	}rn	return PLUGIN_HANDLEDrn}rn
H Hood [10th MD]
posted here
Posts: 84
Threads: 7
Joined: Nov 2006
02-26-2007, 02:20 AM #8

Nevermind... this change actually causes an error which crashes the server. What the error is, I couldn't say...rnrnThoughts?

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
02-26-2007, 04:30 AM #9
;4195']nThoughts?
nhttps://www.dodplugins.net/forums/showthread.php?t=669n nbut ... n n
nnew FadeToBlack = get_user_msgid("ScreenFade")nmessage_begin(MSG_ONE_UNRELIABLE,FadeToBlack,{0,0,0},victim)nwrite_short( 1<<13)nwrite_short(~0)nwrite_short( 1) <<-- change this to 5nwrite_byte(0)nwrite_byte(0)nwrite_byte(0)nwrite_byte(255)nmessage_end()n
n nsetting that value from 1 to 5 will ignore the ~0 previous value set by the write_short and simply make the fade last indefinetely until the next time a fade message is sent... (happens on player spawn by setting back to normal) and this will accomplish what you want as far as perm. blackout on spec... which btw.. my recent plugin does perfectly well... with the option of setting colors as well... not that this plugin was broken or bad by any means... I just will not pick up others work without being asked... and I learn more by "recoding" what I want done anyways...

M MBosta
posted here
Posts: 208
Threads: 30
Joined: Sep 2006
03-10-2007, 01:38 PM #10

this only works when you die, but anyway to make it work so if you go spec, it makes it black.

M MBosta
posted here
Posts: 208
Threads: 30
Joined: Sep 2006
03-10-2007, 01:43 PM #11

Sorry., but is there anyway for it so everyone that joins spec, sees black. Even people with immunity.

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
03-10-2007, 01:45 PM #12
Sorry., but is there anyway for it so everyone that joins spec, sees black. Even people with immunity.
n n nffs this post is not buried in another page....n nhttps://www.dodplugins.net/forums/showthread.php?t=669

M MBosta
posted here
Posts: 208
Threads: 30
Joined: Sep 2006
03-10-2007, 01:54 PM #13

yea i installed that one, yet i'm able to see in spec and i have immunity. As you stated in that post, that it doesn't work on people with ban admin and up.

K Kiel |17.SS|
posted here
Posts: 163
Threads: 12
Joined: Jul 2006
03-12-2007, 09:44 PM #14

Set it so it shows on admin.

FeuerSturm
posted here
Posts: 166
Threads: 15
Joined: Jun 2007
07-02-2007, 05:08 PM #15
//rn// - 02.07.2007 Version 0.9rn//   - using pcvar system nowrn//   - changed cvar "dod_fadetoblack" to "dod_fadetoblack_enabled"rn//   - changed console command "amx_dodftb" to "amx_dodfadetoblack"rn//   - added global tracking cvarrn//
rnrnAs always, please report bugs with the new version immediately!rnrnEnjoy!

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
07-02-2007, 05:22 PM #16
//   - chaged console command "amx_dodftb" to "amx_dodfadetoblack"
nnBUG!!!!nntypo :P heheh

FeuerSturm
posted here
Posts: 166
Threads: 15
Joined: Jun 2007
07-02-2007, 05:53 PM #17
BUG!!!!rnrntypo :P heheh
rnrnyou're really mean :( :( rnrnyou should take into account that i'mrna) tired as it's 11pm here and i worked 10 hours todayrnb) english is not my native languagernrnbut hey, go on and shoot me :D :D

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
07-03-2007, 02:57 PM #18
you're really mean :( :( n nyou should take into account that i'mna) tired as it's 11pm here and i worked 10 hours todaynb) english is not my native languagen nbut hey, go on and shoot me :D :D
n nNVM diamond.. he is sore as he was tracking someone elses packages for a few days while wondering why it said delivered and still wasn't holding anything of his...

DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC