iPrestege Posted December 30, 2012 Share Posted December 30, 2012 Hello , how are you today hmm ... are you fine ? i have some problem with this shit code when i do restart admin the function of the code doesn,t work :@ idont know why ! this is the code for kenix but i add some thing .. : for _, Ads in ipairs( getElementsByType( 'gui-button' ) ) do guiSetProperty( Ads, 'NormalTextColour', 'FFFFFF00' ) guiSetProperty( Ads, 'HoverTextColour', 'FFFF0000' ) guiSetProperty( Ads, 'PushedTextColour', 'FF220000' ) guiSetFont ( Ads, "default-bold-small" ) end Link to comment
TD[M]ER Posted December 30, 2012 Share Posted December 30, 2012 i have the same problem Link to comment
TAPL Posted December 30, 2012 Share Posted December 30, 2012 addEventHandler("onClientResourceStart", root, function() for _, Ads in ipairs(getElementsByType('gui-button')) do guiSetProperty(Ads, 'NormalTextColour', 'FFFFFF00') guiSetProperty(Ads, 'HoverTextColour', 'FFFF0000') guiSetProperty(Ads, 'PushedTextColour', 'FF220000') guiSetFont(Ads, "default-bold-small") end end) Link to comment
iPrestege Posted December 30, 2012 Author Share Posted December 30, 2012 addEventHandler("onClientResourceStart", root, function() for _, Ads in ipairs(getElementsByType('gui-button')) do guiSetProperty(Ads, 'NormalTextColour', 'FFFFFF00') guiSetProperty(Ads, 'HoverTextColour', 'FFFF0000') guiSetProperty(Ads, 'PushedTextColour', 'FF220000') guiSetFont(Ads, "default-bold-small") end end) Doesn,t Work Link to comment
TD[M]ER Posted December 30, 2012 Share Posted December 30, 2012 Event : onClientGUIClick it's will work =D Link to comment
TAPL Posted December 30, 2012 Share Posted December 30, 2012 I think timer is needed. addEventHandler("onClientResourceStart", root, function() setTimer(function() for _, Ads in ipairs(getElementsByType('gui-button')) do guiSetProperty(Ads, 'NormalTextColour', 'FFFFFF00') guiSetProperty(Ads, 'HoverTextColour', 'FFFF0000') guiSetProperty(Ads, 'PushedTextColour', 'FF220000') guiSetFont(Ads, "default-bold-small") end end, 250, 1) end) Link to comment
iPrestege Posted December 30, 2012 Author Share Posted December 30, 2012 I think timer is needed. addEventHandler("onClientResourceStart", root, function() setTimer(function() for _, Ads in ipairs(getElementsByType('gui-button')) do guiSetProperty(Ads, 'NormalTextColour', 'FFFFFF00') guiSetProperty(Ads, 'HoverTextColour', 'FFFF0000') guiSetProperty(Ads, 'PushedTextColour', 'FF220000') guiSetFont(Ads, "default-bold-small") end end, 250, 1) end) it works TAPL Thanks But The admin panel Not colored what is the reason? how can i fix it ? Link to comment
TAPL Posted December 30, 2012 Share Posted December 30, 2012 I think timer is needed. addEventHandler("onClientResourceStart", root, function() setTimer(function() for _, Ads in ipairs(getElementsByType('gui-button')) do guiSetProperty(Ads, 'NormalTextColour', 'FFFFFF00') guiSetProperty(Ads, 'HoverTextColour', 'FFFF0000') guiSetProperty(Ads, 'PushedTextColour', 'FF220000') guiSetFont(Ads, "default-bold-small") end end, 250, 1) end) it works TAPL Thanks But The admin panel Not colored what is the reason? how can i fix it ? /restart admin Link to comment
iPrestege Posted December 30, 2012 Author Share Posted December 30, 2012 I think timer is needed. addEventHandler("onClientResourceStart", root, function() setTimer(function() for _, Ads in ipairs(getElementsByType('gui-button')) do guiSetProperty(Ads, 'NormalTextColour', 'FFFFFF00') guiSetProperty(Ads, 'HoverTextColour', 'FFFF0000') guiSetProperty(Ads, 'PushedTextColour', 'FF220000') guiSetFont(Ads, "default-bold-small") end end, 250, 1) end) it works TAPL Thanks But The admin panel Not colored what is the reason? how can i fix it ? /restart admin I do restart for Admin Panel but didn,t work . Link to comment
TAPL Posted December 30, 2012 Share Posted December 30, 2012 I don't think i get what you mean, can you post an image for the problem? Link to comment
iPrestege Posted December 30, 2012 Author Share Posted December 30, 2012 I don't think i get what you mean, can you post an image for the problem? this what i mean i mean all resource in my server has been colored but the admin panel not colored i hope you understand me : the image : http://store3.up-00.com/Nov12/QWj86611.png Link to comment
TAPL Posted December 30, 2012 Share Posted December 30, 2012 Well, it work perfect for me: the image : http://i.imgur.com/PrcVU.jpg Link to comment
iPrestege Posted December 30, 2012 Author Share Posted December 30, 2012 (edited) Well, it work perfect for me:the image :[/b] http://i.imgur.com/PrcVU.jpg Hmm... TAPL Try to restart the admin panel ! but i think if i add the code in admin panel files it will works perfect ?? # what i think about it doesn,t work . Edited December 30, 2012 by Guest Link to comment
TAPL Posted December 30, 2012 Share Posted December 30, 2012 Oh i see Well, let make it with infinite timer then, not best solution anyway but it can do the job. addEventHandler("onClientResourceStart", resourceRoot, function() setTimer(function() for _, Ads in ipairs(getElementsByType('gui-button')) do guiSetProperty(Ads, 'NormalTextColour', 'FFFFFF00') guiSetProperty(Ads, 'HoverTextColour', 'FFFF0000') guiSetProperty(Ads, 'PushedTextColour', 'FF220000') guiSetFont(Ads, "default-bold-small") end end, 250, 0) end) Link to comment
iPrestege Posted December 30, 2012 Author Share Posted December 30, 2012 Oh i seeWell, let make it with infinite timer then, not best solution anyway but it can do the job. addEventHandler("onClientResourceStart", resourceRoot, function() setTimer(function() for _, Ads in ipairs(getElementsByType('gui-button')) do guiSetProperty(Ads, 'NormalTextColour', 'FFFFFF00') guiSetProperty(Ads, 'HoverTextColour', 'FFFF0000') guiSetProperty(Ads, 'PushedTextColour', 'FF220000') guiSetFont(Ads, "default-bold-small") end end, 250, 0) end) it works 100 % thank you TAPL 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