Raised This Month: $ Target: $400
 0% 

ScreenFade


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hellraser
Member
Join Date: Jul 2004
Old 09-21-2004 , 17:26   ScreenFade
Reply With Quote #1

Hey once again in need of help
So i'm using this,it works correctly but what i wanna do is fade to black (0,0,0) like the cvar (mp_fadetoblack) and this code doesn't exactly do that...why?
Code:
public nvg1(id) {
    new all[32], all_num 
    get_players(all,all_num,"a") 
    for (new i=0;i<all_num;i++) {

    new gMsgScreenFade = get_user_msgid("ScreenFade")
    message_begin(MSG_ONE,gMsgScreenFade,{0,0,0},all[i]) 
    write_short( 1<<14 ) 
    write_short( 1<<14 ) 
    write_short( 1<<12 ) 
    write_byte( 0 ) 
    write_byte( 0 ) 
    write_byte( 0 ) 
    write_byte( 0 ) 
    message_end() 
	}
}
Thanks,
hellraser is offline
malex
Junior Member
Join Date: Aug 2004
Old 09-21-2004 , 18:57  
Reply With Quote #2

That last write_byte sets the alpha for the fade. I'm guessing alpha = 0 means fully transparent fade, i.e. no fade at all. In my plugin, I use alpha of 255, and it works.

\malex\
malex is offline
johnjg75
Veteran Member
Join Date: Mar 2004
Location: Delaware
Old 09-21-2004 , 18:59  
Reply With Quote #3

yeh the last is alpha n if u want it to be completely black then u use this:
Code:
public nvg1(id) {     new all[32], all_num     get_players(all,all_num,"a")     for (new i=0;i<all_num;i++) {     new gMsgScreenFade = get_user_msgid("ScreenFade")     message_begin(MSG_ONE,gMsgScreenFade,{0,0,0},all[i])     write_short( 1<<14 )     write_short( 1<<14 )     write_short( 1<<12 )     write_byte( 0 )     write_byte( 0 )     write_byte( 0 )     write_byte( 255 )     message_end()    } }
__________________
johnjg75 is offline
Send a message via AIM to johnjg75 Send a message via MSN to johnjg75 Send a message via Yahoo to johnjg75
hellraser
Member
Join Date: Jul 2004
Old 09-22-2004 , 08:35  
Reply With Quote #4

Thx guys
hellraser is offline
hellraser
Member
Join Date: Jul 2004
Old 09-30-2004 , 01:44  
Reply With Quote #5

what would i have to do to make it last for ever?
Thx,
hellraser is offline
Votorx
Senior Member
Join Date: Jun 2004
Old 09-30-2004 , 13:07  
Reply With Quote #6

Call it each round?
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
hellraser
Member
Join Date: Jul 2004
Old 09-30-2004 , 14:37  
Reply With Quote #7

nah,its a function that is called when an amount of frags has been reached...i dont know exactly how to play around with the write_short etc..
Thx,
hellraser is offline
Votorx
Senior Member
Join Date: Jun 2004
Old 09-30-2004 , 18:42  
Reply With Quote #8

Well if that's the case, then you should have no problem. That stays on untill the player dies.
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
hellraser
Member
Join Date: Jul 2004
Old 10-01-2004 , 01:38  
Reply With Quote #9

well actually it doesnt...it fades & stays black for about 5s then it comes back to normal...
[EDIT] : Nevermind i was calling another function just after .. ;)

Thx
hellraser 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 17:17.


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