Michcio Posted December 12, 2012 Posted December 12, 2012 Hi! I have problem with skin select. I want do sth like you click "prawobutt" button and button "skinidbutt" text will be set to next skin id from table. skiny = { 0, 24, 26, 44, 432 } addEventHandler( "onClientGUIClick", getRootElement(), function() if source == prawobutt then s = guiGetText(skinidbutt) i = 1 for i,v in ipairs(skiny) do s = skiny[i] end guiSetText(skinidbutt,s) end end )
Castillo Posted December 12, 2012 Posted December 12, 2012 skiny = { 0, 24, 26, 44, 432 } index = 0 addEventHandler ( "onClientGUIClick", getRootElement(), function ( ) if ( source == prawobutt ) then index = ( index + 1 ) if ( skiny [ index ] ) then guiSetText ( skinidbutt, skiny [ index ] ) else index = 1 guiSetText ( skinidbutt, skiny [ index ] ) end end end ) Try that.
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