Post: PreCacheShader not working!
03-17-2016, 11:56 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); So, All it does is turns black like it was at first?? Any suggestions??

I'm precaching using "precacheShader("em_bg_ani_dmh");"
I place the code in:
    
init()
{
precacheShader("em_bg_ani_dmh");
level thread onplayerconnect();
}


That doesn't seem to work because I'm trying to use this as a backgound for my mod menu! Also I'm using Sharks menu base < I put overflow fix in and that still didn't fix this problem.
Heres the stuff I put in shader:
    
StoreShaders()
{
self.menu.background = self drawShader("em_bg_ani_dmh", 320, -50, 300, 500, (255, 255, 255), 0, 0);
self.menu.scroller = self drawShader("white", 320, -500, 300, 17, (0, 0, 0), 255, 1);
self.menu.line = self drawShader("white", 170, -550, 2, 500, (0, 0, 0), 255, 2);
}
Last edited by Elitexboxer ; 03-18-2016 at 12:22 AM. Reason: Explaining what it is doing incorrectly which I'm not sure what I'm doing wrong?
03-19-2016, 02:42 AM #11
DrHackHD
Bounty hunter
add the same code as u did before:

init():

foreach( shades in strTok( "your shader here", ",") )
precacheShader( shades );

InitialisingMenu()
{
self.Menu.Material["Scrollbar"] = self SetMaterial("CENTER", "TOP", -97, 0, 10, 13, (0.502,0.502,0.502), "your shader here" , 1, 0);
}

DONE
03-19-2016, 02:44 AM #12
Originally posted by DrHackHD View Post
add the same code as u did before:

init():

foreach( shades in strTok( "your shader here", ",") )
precacheShader( shades );

InitialisingMenu()
{
self.Menu.Material["Scrollbar"] = self SetMaterial("CENTER", "TOP", -97, 0, 10, 13, (0.502,0.502,0.502), "your shader here" , 1, 0);
}

DONE


well, I wanting to use the animated logo for my scroller. Here is what my storesahders look like

StoreShaders()
{
self.menu.background = self createRectangle("CENTER", "CENTER", 320, -50, 1, 1, 0, (10, 0, 0), 0, "compass_emp");
self.menu.scroller = self createRectangle("CENTER", "TOP", 320, -50, 1, 1, 1, (255, 255, 255), 0, "em_bg_ani_afterlife");
self.menu.line = self createRectangle("CENTER", "CENTER", 320, -50, 1, 1, 2, (255, 0, 0), 0, "white");
}
03-19-2016, 02:48 AM #13
DrHackHD
Bounty hunter
init():
foreach( shades in strTok( "compass_emp,ui_arrow_left,em_bg_ani_afterlife", ",") )
precacheShader( shades );


StoreShaders()
{
self.menu.background = self createRectangle("CENTER", "CENTER", 320, -50, 1, 1, 0, (10, 0, 0), 0, "compass_emp");
self.menu.scroller = self createRectangle("CENTER", "TOP", 320, -50, 1, 1, 1, (255, 255, 255), 0, "em_bg_ani_afterlife");
self.menu.line = self createRectangle("CENTER", "CENTER", 320, -50, 1, 1, 2, (255, 0, 0), 0, "white");
}
03-19-2016, 02:52 AM #14
Originally posted by DrHackHD View Post
init():
foreach( shades in strTok( "compass_emp,ui_arrow_left,em_bg_ani_afterlife", ",") )
precacheShader( shades );


StoreShaders()
{
self.menu.background = self createRectangle("CENTER", "CENTER", 320, -50, 1, 1, 0, (10, 0, 0), 0, "compass_emp");
self.menu.scroller = self createRectangle("CENTER", "TOP", 320, -50, 1, 1, 1, (255, 255, 255), 0, "em_bg_ani_afterlife");
self.menu.line = self createRectangle("CENTER", "CENTER", 320, -50, 1, 1, 2, (255, 0, 0), 0, "white");
}


Not visable again... the scroller isn't visable,,
03-19-2016, 02:56 AM #15
DrHackHD
Bounty hunter
try to use another shader
03-19-2016, 03:00 AM #16
DrHackHD
Bounty hunter
no wait, u need to change the color of the shader and then add the shader code try this color is transparent 0.455, 0.455, 0.463

StoreShaders()
{
self.menu.background = self createRectangle("CENTER", "CENTER", 320, -50, 1, 1, 0, (10, 0, 0), 0, "compass_emp");
self.menu.scroller = self createRectangle("CENTER", "TOP", 320, -50, 1, 1, 1, ( 0.455, 0.455, 0.463), 0, "em_bg_ani_afterlife");
self.menu.line = self createRectangle("CENTER", "CENTER", 320, -50, 1, 1, 2, (255, 0, 0), 0, "white");
}
03-19-2016, 03:01 AM #17
DrHackHD
Bounty hunter
can i have a screenshot?
03-19-2016, 03:03 AM #18
Originally posted by DrHackHD View Post
no wait, u need to change the color of the shader and then add the shader code try this color is transparent 0.455, 0.455, 0.463

StoreShaders()
{
self.menu.background = self createRectangle("CENTER", "CENTER", 320, -50, 1, 1, 0, (10, 0, 0), 0, "compass_emp");
self.menu.scroller = self createRectangle("CENTER", "TOP", 320, -50, 1, 1, 1, ( 0.455, 0.455, 0.463), 0, "em_bg_ani_afterlife");
self.menu.line = self createRectangle("CENTER", "CENTER", 320, -50, 1, 1, 2, (255, 0, 0), 0, "white");
}


Still now visible...
03-19-2016, 03:04 AM #19
Originally posted by DrHackHD View Post
can i have a screenshot?


Let me try one thing and I'll screenshot

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo