AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Problem with Fade (https://forums.alliedmods.net/showthread.php?t=114177)

GaRfWeN 01-02-2010 13:31

Problem with Fade
 
Hello!

I made a script to FadeToBlack people that uses TS/skype/etc...
But it has a problem, while your dead and with "fade" on, if you click mouse1(+attack) you'll be able to see like a screenshot from who youre specting.

Code:

public fade(id)
{
    if(!is_user_alive(id))
    {
        message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)
        write_short(~0); // duration, ~0 is max
        write_short(~0); // hold time, ~0 is max
        write_short(0x0004); // flags, no idea wtf 1<<12 is
        write_byte(0); // red, 0 for black
        write_byte(0); // green, 0 for black
        write_byte(0); // blue, 0 for black
        write_byte(255); // alpha, 255 for total black
        message_end();
        set_task(1.0,"fade",id); // reset it, screenfade only last for so long
    }
}

Any idea?
Thank you!


All times are GMT -4. The time now is 04:06.

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