Hi everyone, im looking for a code to destroy this:
this is Yamatos shader code. i want it torn on and off by pressing actionslot 3 but i dont know how. i tryed
and tryed (actually i tryed many other ways)
i spended about 3-4 hours to find it, and read every thread about HUD elements and shaders but no results, going to sleep now
i hope its easy for someone and i will get support. Thanks you.
Code:
DayNightNext()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand("dpad_up", "+actionslot 3");
for(;;)
{
self waittill("dpad_up");
self setClientDvar( "r_colormap", "1" );
self setClientDvar( "r_filmUseTweaks", "0" );
self setClientDvar( "r_filmTweakEnable", "0" );
self iPrintLnBold("^7Night Vision");
self setClientDvars( "cg_watersheeting", 1, "cg_waterSheeting_brightness", 0, "cg_waterSheeting_contrast", 1, "cg_waterSheeting_darkTint", 1, "cg_waterSheeting_desaturation", 0, "cg_waterSheeting_distortionScaleFactor", 0.021961, "cg_waterSheeting_enable", 0, "cg_waterSheeting_fadeDuration", 2, "cg_waterSheeting_lightTint", 0.780261, "cg_waterSheeting_magnitude", 0.0655388, "cg_waterSheeting_radius", 4.44051 );
self SetWaterSheeting( 1, 3 );
self setDepthOfField( 0, 110, 512, 4096, 6, 1.8 );
self VisionSetNakedForPlayer( "oilrig_underwater", 0.5 );
self.googles = self CreateOverlay( "ballistic_overlay", 1, undefined );
self playSound( "grenade_bounce_water" );
self waittill("dpad_up");
self setClientDvar( "r_filmUseTweaks", "1" );
self setClientDvar( "r_filmTweakEnable", "1" );
self setClientDvar( "r_filmTweakBrightness", "-0.5" );
self setClientDvar( "r_filmTweakDesaturation", "1" );
self setClientDvar( "r_filmTweakDesaturation", "1.7" );
self setClientDvar( "r_filmTweakContrast", "2" );
self setClientDvar( "r_filmTweakDarkTint", "1 1 1" );
self setClientDvars( "cg_watersheeting", 1, "cg_waterSheeting_brightness", 0, "cg_waterSheeting_contrast", 1, "cg_waterSheeting_darkTint", 1, "cg_waterSheeting_desaturation", 0, "cg_waterSheeting_distortionScaleFactor", 0.021961, "cg_waterSheeting_enable", 0, "cg_waterSheeting_fadeDuration", 2, "cg_waterSheeting_lightTint", 0.780261, "cg_waterSheeting_magnitude", 0.0655388, "cg_waterSheeting_radius", 4.44051 );
self SetWaterSheeting( 1, 3 );
self setDepthOfField( 0, 110, 512, 4096, 6, 1.8 );
self VisionSetNakedForPlayer( "oilrig_underwater", 0.5 );
self.googles = self CreateOverlay( "ballistic_overlay", 1, undefined );
self playSound( "grenade_bounce_water" );
}
}
CreateOverlay( names, startalpha, color )
{
overlay = newHudElem();
overlay.x = 0;
overlay.y = 0;
overlay setshader( names, 640, 480 );
overlay.alignX = "left";
overlay.alignY = "top";
overlay.sort = 1;
overlay.color = color;
overlay.horzAlign = "fullscreen";
overlay.vertAlign = "fullscreen";
overlay.alpha = startalpha;
overlay.foreground = true;
return overlay;
}
Code:
CreateOverlay( names, startalpha, color ) destroy();
Code:
newHudElem() destroy();
Code:
self.googles destroy();
i hope its easy for someone and i will get support. Thanks you.