i want to fade a players screen to black (just like fade to black)
i know i have to use
this
so i wrote these functions
PHP Code:
g_MsgFade = get_user_msgid("ScreenFade");
public BlackOutSameIPs() {
g_iDeadPlayer = read_data(2);
if(!is_user_alive(g_iDeadPlayer) && g_bSameIPs[g_iDeadPlayer]) {
message_begin(MSG_ONE, g_MsgFade, {0,0,0}, g_iDeadPlayer);
write_short(4096);
write_short(4096);
write_short(4096);
write_byte(0);
write_byte(0);
write_byte(0);
write_byte(255);
message_end();
}
}
and the one that removes his black screen (back to normal)
PHP Code:
g_MsgFade = get_user_msgid("ScreenFade");
public ResetScreen(iPlayerID) {
if(is_user_alive(iPlayerID)) {
message_begin(MSG_ONE, g_MsgFade, {0,0,0}, iPlayerID);
write_short(1<<12);
write_short(1<<8);
write_short(1<<1);
write_byte(0);
write_byte(0);
write_byte(0);
write_byte(255);
message_end();
}
}
i have no idea what these mean
PHP Code:
write_short(1<<12);
write_short(1<<8);
write_short(1<<1);
or these
PHP Code:
write_short(4096);
write_short(4096);
write_short(4096);
sometime you write numbers and others you write 1>>3 or w/e that means

can you please explain?
also i want that the first function blacks it out infinitly until i call the second function that removes the black screen
EDIT: i just noticed
Note: Duration and HoldTime is in special units. 1 second is equal to (1<<12) i.e. 4096 units.
so lets say i want it for 2 seconds, i do 4096*2 ?? bu ti want it not to stop
any help??
thank you in advance