PartyMTA Posted June 1, 2014 Share Posted June 1, 2014 This code seems not working for me: function images() loginButton = guiCreateStaticImage(x/1.55,y/1.6,200/5,200/5,login,false) userIcon = guiCreateStaticImage( x/5,y/3,256,256, user,false) end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), images ) addEventHandler("onClientMouseEnter", root, function(x,y) if (source == userIcon) then guiSetAlpha(source,150) end end ) addEventHandler("onClientMouseLeave", root, function(x,y) if (source == userIcon) then guiSetAlpha(source,255) end end ) Yes, images are rendered from an event on other place in full code Link to comment
Castillo Posted June 1, 2014 Share Posted June 1, 2014 Any error in the debugscript ( /debugscript 3 )? Link to comment
Castillo Posted June 1, 2014 Share Posted June 1, 2014 Yeah, pa3ck is right, I missed that part. GUI alpha is between 0 and 1. So, instead of 255, you put 1. And instead of 150, you put 0.6 or so. Link to comment
.:HyPeX:. Posted June 3, 2014 Share Posted June 3, 2014 Wanted to add this over just in case: To get a 0-1 value from 0-255: value = alpha / 255 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now