Raised This Month: $ Target: $400
 0% 

screen fade


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 04-16-2013 , 01:02   Re: screen fade
Reply With Quote #7

Sorry, I fell asleep after I posted my first message.

Do you mean something like this?

Code:
#include <amxmodx> #include <hamsandwich> new g_msgScreenFade, bool:g_bGetBlackScreen[ 33 ]; public plugin_init() {     RegisterHam( Ham_Spawn, "player", "CBase_PlayerSpawn_Post", 1 );         register_logevent( "Event_RoundEnd", 2, "1=Round_End" );         g_msgScreenFade = get_user_msgid( "ScreenFade" );   } public CBase_PlayerSpawn_Post( id ) {     if( is_user_alive( id ) )     {         if( g_bGetBlackScreen[ id ] )         {             Message_ScreenFade( id, 0, 0, 1<<2, 0, 0, 0, 255 );             g_bGetBlackScreen[ id ] = false;         }         else    Message_ScreenFade( id, 6<<12, 0, 0, 255, 0, 0, 255 );      } } public Event_RoundEnd() {     new Players[ 32 ], iNum;     get_players( Players, iNum, "ach" );         for( new i ; i < iNum ; i ++ )     {         //if get green screen         {             Message_ScreenFade( Players[ i ], 6<<12, 0, 0, 0, 155, 0, 255 );             g_bGetBlackScreen[ Players[ i ] ] = true;         }     } } public Message_ScreenFade( id, iDuration, iHold, FadeMode, iRed, iGreen, iBlue, iAlpha ) {     message_begin( MSG_ONE_UNRELIABLE, g_msgScreenFade,{ 0, 0, 0 }, id );     write_short( iDuration );     write_short( iHold );     write_short( FadeMode );     write_byte( iRed );     write_byte( iGreen );     write_byte( iBlue );     write_byte( iAlpha );     message_end(); }
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
 



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 10:52.


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