PartyMTA Posted June 1, 2014 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
Castillo Posted June 1, 2014 Posted June 1, 2014 Any error in the debugscript ( /debugscript 3 )? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted June 1, 2014 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. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted June 3, 2014 Posted June 3, 2014 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
.:HyPeX:. Posted June 3, 2014 Posted June 3, 2014 Wanted to add this over just in case: To get a 0-1 value from 0-255: value = alpha / 255 My ingame nick is ~HyPeX~ BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager
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