AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Screen Fade problems (https://forums.alliedmods.net/showthread.php?t=50465)

blackops7799 01-27-2007 02:23

Screen Fade problems
 
Well on my server I have that night/day timer. I decided to make a night vision thing for this mod I use. It fades the screen to the green color, but when you get hit/damaged the screen goes back to normal even though it still says its on.

Can this be fixed?

Code:
public nightvisiontoglle(id) {     if(!is_user_alive(id))     {         return PLUGIN_HANDLED     }     if(nightvision[id] == 0)     {         message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id);         write_short(~0);         write_short(~0);         write_short(1<<2);         write_byte(0);         write_byte(255);         write_byte(0);         write_byte(50);         message_end();         client_print(id, print_chat, "[ZombieMod] Night Vision On.")         nightvision[id] = 1         return PLUGIN_HANDLED     }     else     {         message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id);         write_short(~0);         write_short(~0);         write_short(1<<2);         write_byte(0);         write_byte(0);         write_byte(0);         write_byte(0);         message_end();         client_print(id, print_chat, "[ZombieMod] Night Vision Off.")         nightvision[id] = 0         return PLUGIN_HANDLED     }     return PLUGIN_HANDLED }

dutchmeat 01-27-2007 07:36

Re: Screen Fade problems
 
use pre/postthink


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

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