Jump to content

Skin select


Michcio

Recommended Posts

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 
) 

Link to comment
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.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...