Raised This Month: $ Target: $400
 0% 

Trying to get a user's screen to go black for 2 seconds...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 06-14-2006 , 01:16  
Reply With Quote #6

This is a stock from superhero

Code:
stock setScreenFlash(id, red, green, blue, decisecs, alpha) {     if (!is_user_connected(id)) return     message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)     write_short( 1<<decisecs ) // fade lasts this long duration     write_short( 1<<decisecs ) // fade lasts this long hold time     write_short( 1<<12 ) // fade type (in / out)     write_byte( red ) // fade red     write_byte( green ) // fade green     write_byte( blue ) // fade blue     write_byte( alpha ) // fade alpha     message_end() }

and here is an example of it being used

Code:
            new alphanum = damage * 2             if (alphanum > 200) alphanum = 200             else if (alphanum < 40) alphanum = 40             setScreenFlash(attacker, 255, 10, 10, 10, alphanum )  //Red Screen Flash

this ends up being a pretty quick red flash with a varying alpha ammount.

Some colors are not allowed so you might want to try another color first (like the one I use here works for sure). Another option would be to use a message logger and then enable that cvar "fadetoblack". Catch that message and then replicate it.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
 



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


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