PDA

View Full Version : how do i make it sow view fade to black


Battousai-sama
04-13-2008, 00:55
tittle isnt reallt descriptive but yea.

how do i make it so if i want that when player spectates x player. his view is faded to black.
and i put a command in it so i use or all or per team or for x player so he can view the players view as if he was spectating him.
and players can be readed from an ini file.

alien
04-13-2008, 01:49
Quoting Emp` ...

#define SECONDS_TO_SCREENFADE_UNITS(%1) ((1<<12) * (%1))

public BlackOut(id)
{
new time = 5 // in seconds
message_begin(MSG_ONE, gMsgScreen, {0,0,0}, id)
write_short(1<<SECONDS_TO_SCREENFADE_UNITS(time)) // Duration
write_short(1<<SECONDS_TO_SCREENFADE_UNITS(time)) // Hold Time
write_short(1<<2) // Flags // HOLD
write_byte(0) // Red
write_byte(0) // Green
write_byte(0) // Blue
write_byte(255) // Aplha
message_end()
}

Don't know about other stuff you asked ... please explain.