Avagard Posted April 25, 2017 Share Posted April 25, 2017 (edited) hello! i want when the cursor is on the label the font get bigger, and if the cursor is not on the labbel it goes back to normal i made the script but it doesn't work.. anybody help? function enter() local bigfont = guiCreateFont("files/mtago.ttf", 20) if guiGetText(label) == "PLAY" then guiSetFont(label, bigfont) end end addEventHandler( "onClientMouseEnter", root, enter)]] function leave() local smallfont = guiCreateFont("files/mtago.ttf", 15) if not guiGetText(label) == "PLAY" then guiSetFont(label, smallfont) end end addEventHandler( "onClientMouseLeave", root, leave) Edited April 25, 2017 by Avagard Link to comment
Avagard Posted April 25, 2017 Author Share Posted April 25, 2017 nvm found the problem. Link to comment
AHMED MOSTAFA Posted April 25, 2017 Share Posted April 25, 2017 (edited) 10 hours ago, Avagard said: hello! i want when the cursor is on the label the font get bigger, and if the cursor is not on the labbel it goes back to normal i made the script but it doesn't work.. anybody help? function enter() local bigfont = guiCreateFont("files/mtago.ttf", 20) if guiGetText(label) == "PLAY" then guiSetFont(label, bigfont) end end addEventHandler( "onClientMouseEnter", root, enter)]] function leave() local smallfont = guiCreateFont("files/mtago.ttf", 15) if not guiGetText(label) == "PLAY" then guiSetFont(label, smallfont) end end addEventHandler( "onClientMouseLeave", root, leave) function enter() local Font1 = guiCreateFont("files/mtago.ttf", 20) Text = guiGetText(label) if source == label then if Text == "PLAY" then guiSetFont(label, Font1 ) end end end addEventHandler( "onClientMouseEnter", root, enter) function leave() local Font2 = guiCreateFont("files/mtago.ttf", 15) Text = guiGetText(label) if source == label then if not Text == "PLAY" then guiSetFont(label, Font2 ) end end end addEventHandler( "onClientMouseLeave", root, leave) 9 hours ago, Avagard said: nvm found the problem. sorry about that ... i did not see your message Edited April 25, 2017 by Killer Project 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