Raised This Month: $ Target: $400
 0% 

Removing FadeScreen


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 09-15-2012 , 23:16   Re: Removing FadeScreen
Reply With Quote #3

PHP Code:
#include < amxmodx >
#include < fakemeta >
 
#define ONE_SECOND ( 1 << 12 ) /* 4096 */
 
#define FADE_PERMANENTLY 0x0004 /* 4 */
#define FADE_TEMPORARY 0x0001 /* 1 */
 
#define MEM_ALLOCATED 2
 
enum {
  
Blind_Permanently/* 0 */
  
Unblind/* 1 */
  
Blind_Temporary /* 2 */
};
 
new 
gRgGgBgA 255;
 
boolSendScreenFadeiReceiveriTypeiTime ONE_SECOND ) {
    static 
iScreenFade;
 
    if( !
iScreenFade )
        
iScreenFade get_user_msgid"ScreenFade" );
 
    if( !
iScreenFade || pev_validiReceiver ) != MEM_ALLOCATED /* Object's memory is still allocated! */
        
return false;
 
    
message_beginMSG_ONE_UNRELIABLEiScreenFade_iReceiver );
 
    if( 
iType == Blind_Permanently || iType == Unblind ) {
        
write_short);
        
write_short);
 
        
write_shortiType == Unblind FADE_TEMPORARY FADE_PERMANENTLY );
    }
 
    else if( 
iType == Blind_Temporary ) {
        
write_shortiTime );
        
write_shortiTime );
 
        
write_shortFADE_TEMPORARY );
    }
 
    
write_bytegR );
    
write_bytegG );
    
write_bytegB );
 
    
write_bytegA );
 
    
message_end( );
 
    return 
true;
}
 
SetColor/* red *//* green *//* blue *//* alpha [ blind's intensity ] */ ) {
  
gR clampR0255 ), gG clampG0255 ), gB clampB0255 ), gA clampA0255 );
}
 
/*
  To blind: SendScreenFade( iTarget, Blind_Temporary, ONE_SECOND * 0.2 )
  To blind permanently: SendScreenFade( iTarget, Blind_Permanently )
  To unblind: SendScreenFade( iTarget, Unblind )
  To change blind color: SetColor( 255, 0, 0, 255 )
*/ 
__________________

Last edited by claudiuhks; 09-17-2012 at 16:07.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
 



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 08:21.


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