Post: [CODE]Menu Shaders
06-02-2011, 04:59 AM #1
INSAN3LY_D34TH
INSAN3LY GAMING
(adsbygoogle = window.adsbygoogle || []).push({}); So i haven't seen this code anywhere so i thought i would give it out to everyone. This is already inside of every patch but for those people who might want to have more than one shader inside their patch this is how to do it. And this is actually my tutorial and i thought i would show this as i have been trying to learn it my self and finally understood it =)
You can either thread the new shader like so

    hud2 = newClientHudElem( player );
hud2.location = 0;
hud2.alignX = "center";
hud2.alignY = "middle";
hud2.foreground = 0;
hud2 setshader ("black", 190, 90);
hud2.alpha = 1;
hud2.x = 35;
hud2.y = 250;


or you may leave it as is under the original hud like so.

    hud = newClientHudElem( player );
hud.location = 0;
hud.alignX = "center";
hud.alignY = "middle";
hud.foreground = 0;
hud.fontScale = scale;
hud.sort = 20;
hud.alpha = alpha;
hud.x = x;
hud.y = y;
hud.og_scale = scale;

hud2 = newClientHudElem( player );
hud2.location = 0;
hud2.alignX = "center";
hud2.alignY = "middle";
hud2.foreground = 0;
hud2 setshader ("black", 190, 90);
hud2.alpha = 1;
hud2.x = 35;
hud2.y = 250;


Now to go into detail on each code for the placement values.

none of the codes need to be edited except these
    hud2 setshader ("black", 190, 90);
hud2.alpha = 1;
hud2.x = 35;
hud2.y = 250;


on hud2 setshader, in quotes is where you need to place your color, if not black you need to place white inside the quotes and thread the color below like so hud2.color = ( 1, 1, 0 );. the 190 is how wide the shader is you want and the 90 is how tall the shader is.

hud2.alpha = 1 is how dark the shader is. 1 is all the way shaded in so you may not see the background of the game. 1 is the highest value and the lowest is .1

hud2.x = 35 is how far from the left side of the screen the shader is. 0 is touching the side of the screen were 200 might be in the middle.

hud2.y = 250 is how far from the top of the screen the shader is. 0 is touching the top of the screen were 400 is at the bottom.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 2 users say thank you to INSAN3LY_D34TH for this useful post:

DarKMaGiiC, iReset Nigga
06-02-2011, 07:40 PM #2
abmbc
Do a barrel roll!
Originally posted by D34TH View Post
So i haven't seen this code anywhere so i thought i would give it out to everyone. This is already inside of every patch but for those people who might want to have more than one shader inside their patch this is how to do it. And this is actually my tutorial and i thought i would show this as i have been trying to learn it my self and finally understood it =)
You can either thread the new shader like so

    hud2 = newClientHudElem( player );
hud2.location = 0;
hud2.alignX = "center";
hud2.alignY = "middle";
hud2.foreground = 0;
hud2 setshader ("black", 190, 90);
hud2.alpha = 1;
hud2.x = 35;
hud2.y = 250;


or you may leave it as is under the original hud like so.

    hud = newClientHudElem( player );
hud.location = 0;
hud.alignX = "center";
hud.alignY = "middle";
hud.foreground = 0;
hud.fontScale = scale;
hud.sort = 20;
hud.alpha = alpha;
hud.x = x;
hud.y = y;
hud.og_scale = scale;

hud2 = newClientHudElem( player );
hud2.location = 0;
hud2.alignX = "center";
hud2.alignY = "middle";
hud2.foreground = 0;
hud2 setshader ("black", 190, 90);
hud2.alpha = 1;
hud2.x = 35;
hud2.y = 250;


Now to go into detail on each code for the placement values.

none of the codes need to be edited except these
    hud2 setshader ("black", 190, 90);
hud2.alpha = 1;
hud2.x = 35;
hud2.y = 250;


on hud2 setshader, in quotes is where you need to place your color, if not black you need to place white inside the quotes and thread the color below like so hud2.color = ( 1, 1, 0 );. the 190 is how wide the shader is you want and the 90 is how tall the shader is.

hud2.alpha = 1 is how dark the shader is. 1 is all the way shaded in so you may not see the background of the game. 1 is the highest value and the lowest is .1

hud2.x = 35 is how far from the left side of the screen the shader is. 0 is touching the side of the screen were 200 might be in the middle.

hud2.y = 250 is how far from the top of the screen the shader is. 0 is touching the top of the screen were 400 is at the bottom.


so for example it'll be:
blackscreen = newClientHudElem( player );
blackscreen.location = 0;
blackscreen.alignX = "center";
blackscreen.alignY = "middle";
blackscreen.foreground = 0;
blackscreen setshader ("black", 190, 90);
blackscreen.color = ( 0, 1, 0 );
blackscreen.alpha = 1;
blackscreen.x = 35;
blackscreen.y = 250; ??
06-02-2011, 07:47 PM #3
INSAN3LY_D34TH
INSAN3LY GAMING
Originally posted by abmbc View Post
so for example it'll be:
blackscreen = newClientHudElem( player );
blackscreen.location = 0;
blackscreen.alignX = "center";
blackscreen.alignY = "middle";
blackscreen.foreground = 0;
blackscreen setshader ("black", 190, 90);
blackscreen.color = ( 0, 1, 0 );
blackscreen.alpha = 1;
blackscreen.x = 35;
blackscreen.y = 250; ??


yes and that will create a new shader on the left side of your screen. ill post a picture in a few hours.

The following user thanked INSAN3LY_D34TH for this useful post:

abmbc
06-02-2011, 07:49 PM #4
abmbc
Do a barrel roll!
Originally posted by D34TH View Post
yes and that will create a new shader on the left side of your screen. ill post a picture in a few hours.


cool, thanks u've helped me alot.
06-02-2011, 07:55 PM #5
INSAN3LY_D34TH
INSAN3LY GAMING
your welcome, i learned this my self yesterday looking in the patch i was making and i thought if i renamed them and changed values maybe i would get another box and i did. so i thought i would help out others
06-02-2011, 08:18 PM #6
abmbc
Do a barrel roll!
Originally posted by D34TH View Post
your welcome, i learned this my self yesterday looking in the patch i was making and i thought if i renamed them and changed values maybe i would get another box and i did. so i thought i would help out others



if u could post diffrent pictures of diffrent shaders and include their codes eg ( 0, 1, 0 ); it would be of great help.
06-02-2011, 08:20 PM #7
INSAN3LY_D34TH
INSAN3LY GAMING
Originally posted by abmbc View Post
if u could post diffrent pictures of diffrent shaders and include their codes eg ( 0, 1, 0 ); it would be of great help.


different shaders as in?
06-02-2011, 08:28 PM #8
abmbc
Do a barrel roll!
Originally posted by D34TH View Post
different shaders as in?


i mean diffrent colors.
06-02-2011, 08:30 PM #9
INSAN3LY_D34TH
INSAN3LY GAMING
ok i will try some colors for you

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo