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

[REQ] Fade screen


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Joce93
Senior Member
Join Date: Feb 2016
Old 10-05-2016 , 15:22   [REQ] Fade screen
Reply With Quote #1

Hi,

I need a plugin who make a red fade screen effect for all players, (with a bind key) for x seconds.

Just like in the video:

https://www.youtube.com/watch?v=kpHVAnhH-Wc#t=1m28s

I found some plugins but for CS :/ Playing on Sven coop.

Thanks !
Joce93 is offline
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 10-05-2016 , 22:38   Re: [REQ] Fade screen
Reply With Quote #2

originale posted by : Exolent[jNr]

not tested btw ...
PHP Code:
#include < amxmodx >
#include < cstrike >

#define FFADE_IN 0x0000
#define FFADE_OUT 0x0001

// the fade type for the color
// FFADE_IN goes from color to normal
// FFADE_OUT goes from normal to color
#define FADE_TYPE FFADE_OUT

new pCvar_Color;
new 
pCvar_Time;

new 
g_iMsgId_ScreenFade;

public 
plugin_init( ) {
    
register_plugin"Round End Fade Color""0.0.1""Exolent" );
    
    
register_clcmd("fade""HandleRoundEnd")
    
    
pCvar_Color register_cvar"fade_color""255 255 255 255" );
    
pCvar_Time register_cvar"fade_time""5" );

    
    
g_iMsgId_ScreenFade get_user_msgid"ScreenFade" );
}

public 
HandleRoundEndid ) {
    new 
iSeconds get_pcvar_numpCvar_Time );
    if( !
iSeconds ) {
        return;
    }
    
    new 
szColor16 ];
    
get_pcvar_stringpCvar_ColorszColor15 );
    
    new 
szRed], szGreen], szBlue], szAlpha];
    
parseszColorszRed3szGreen3szBlue3szAlpha);
    
    new 
iAlpha str_to_numszAlpha );
    if( !
iAlpha ) {
        return;
    }
    
    new 
iRed str_to_numszRed );
    new 
iGreen str_to_numszGreen );
    new 
iBlue str_to_numszBlue );
    
    new 
iUnits clamp( ( iSeconds * ( << 12 ) ), 00xFFFF );
    
    new 
iPlayers32 ], iNum;
    
    for( new 
0iNumi++ ) {
        
message_beginMSG_ONE_UNRELIABLEg_iMsgId_ScreenFade_iPlayers] );
        
write_shortiUnits );
        
write_shortiUnits );
        
write_shortFADE_TYPE );
        
write_byteiRed );
        
write_byteiGreen );
        
write_byteiBlue );
        
write_byteiAlpha );
        
message_end( );
    }

Attached Files
File Type: sma Get Plugin or Get Source (screenFade.sma - 537 views - 1.7 KB)
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |
Dr Zayd is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 10-06-2016 , 09:07   Re: [REQ] Fade screen
Reply With Quote #3

He says he doesn't need this for CS and you give him a code that uses cstrike include.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Joce93
Senior Member
Join Date: Feb 2016
Old 10-06-2016 , 10:05   Re: [REQ] Fade screen
Reply With Quote #4

Yes i'm not playing on CS...

Last edited by Joce93; 10-06-2016 at 12:18.
Joce93 is offline
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 10-09-2016 , 00:22   Re: [REQ] Fade screen
Reply With Quote #5

You can put this request on the other forums then ?
https://forums.alliedmods.net/forumdisplay.php?f=60
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |
Dr Zayd is offline
arnalll
Member
Join Date: Nov 2015
Location: France
Old 10-09-2016 , 03:18   Re: [REQ] Fade screen
Reply With Quote #6

Quote:
Originally Posted by Dr Zayd View Post
You can put this request on the other forums then ?
https://forums.alliedmods.net/forumdisplay.php?f=60

Is this a Troll?

AMXX is for all HL1 Based game ie: CS1.6, DoD, ESF, The Specialist, Sven Coop etc...

By the way with a quick look at exolent code i don't see what is cstrike specific ! will test right now

Ok it compiles and run on DoD just delete the ligne include <cstrike> ... btw it seems to need to be edited a bit for what joce ask for

Last edited by arnalll; 10-09-2016 at 03:40. Reason: completed info
arnalll is offline
RaiderXZ
New Member
Join Date: Oct 2016
Old 10-20-2016 , 09:51   Re: [REQ] Fade screen
Reply With Quote #7

Quote:
Originally Posted by arnalll View Post
Is this a Troll?

AMXX is for all HL1 Based game ie: CS1.6, DoD, ESF, The Specialist, Sven Coop etc...

By the way with a quick look at exolent code i don't see what is cstrike specific ! will test right now

Ok it compiles and run on DoD just delete the ligne include <cstrike> ... btw it seems to need to be edited a bit for what joce ask for
Hi can you show up the edited script ? Im interested for this plugin (i play on sven co-op too) thanks!
RaiderXZ is offline
arnalll
Member
Join Date: Nov 2015
Location: France
Old 10-23-2016 , 03:45   Re: [REQ] Fade screen
Reply With Quote #8

Quote:
Originally Posted by RaiderXZ View Post
Hi can you show up the edited script ? Im interested for this plugin (i play on sven co-op too) thanks!

HTML Code:
#include < amxmodx >


#define FFADE_IN 0x0000
#define FFADE_OUT 0x0001

// the fade type for the color
// FFADE_IN goes from color to normal
// FFADE_OUT goes from normal to color
#define FADE_TYPE FFADE_OUT

new pCvar_Color;
new pCvar_Time;

new g_iMsgId_ScreenFade;

public plugin_init( ) {
    register_plugin( "Fade Color x sec", "0.0.1", "Exolent//modified as requested by anna" );
    
    register_clcmd("fade", "HandleRoundEnd")
    //register_concmd("makefade","HandleRoundEnd",ADMIN_KICK,"toggle fade on for x sec")
    pCvar_Color = register_cvar( "fade_color", "255 255 255 255" );
    pCvar_Time = register_cvar( "fade_time", "5" );

    
    g_iMsgId_ScreenFade = get_user_msgid( "ScreenFade" );
}

public HandleRoundEnd( id ) {
    new iSeconds = get_pcvar_num( pCvar_Time );
    if( !iSeconds ) {
        return;
    }
    
    new szColor[ 16 ];
    get_pcvar_string( pCvar_Color, szColor, 15 );
    
    new szRed[ 4 ], szGreen[ 4 ], szBlue[ 4 ], szAlpha[ 4 ];
    parse( szColor, szRed, 3, szGreen, 3, szBlue, 3, szAlpha, 3 );
    
    new iAlpha = str_to_num( szAlpha );
    if( !iAlpha ) {
        return;
    }
    
    new iRed = str_to_num( szRed );
    new iGreen = str_to_num( szGreen );
    new iBlue = str_to_num( szBlue );
    
    new iUnits = clamp( ( iSeconds * ( 1 << 12 ) ), 0, 0xFFFF );
    
    new iPlayers[ 32 ], iNum;
    
    
        message_begin( MSG_BROADCAST, g_iMsgId_ScreenFade, _, id );
        write_short( iUnits );
        write_short( iUnits );
        write_short( FADE_TYPE );
        write_byte( iRed );
        write_byte( iGreen );
        write_byte( iBlue );
        write_byte( iAlpha );
        message_end( );
    
}
arnalll 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 13:12.


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