Jump to content

probleme next guiStaticImage


iiv03

Recommended Posts

Hi guys I have this screet published but I was correct it I would add a lot of pictures and when I added one picture InfernusIMG3 and I tried the model and opened a palette and I was press Next come to me 2 pictures only and I want 3 pictures to come What is the problem and please fix problem note: I want to add a lot of pictures : 

InfernusIMG_state = false
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        Julian = guiCreateStaticImage(0.24, 0.14, 0.50, 0.70, "data/img/background.png", true)
        guiSetAlpha(Julian, 0.79)

		
        local font0_font = guiCreateFont("data/font/font.ttf", 10)
        guiSetFont(Nick, font0_font)
        guiLabelSetHorizontalAlign(Nick, "center", false)
        guiLabelSetVerticalAlign(Nick, "center")
        TitleImage = guiCreateStaticImage(0.00, 0.00, 1.00, 0.08, "data/img/background.png", true, Julian)

        Title = guiCreateLabel(0.00, 0.00, 0.99, 0.88, "× [ Skins Cars ] ×", true, TitleImage)
        guiSetFont(Title, font0_font)
        guiLabelSetHorizontalAlign(Title, "center", false)
        guiLabelSetVerticalAlign(Title, "center")

        InfernusIMG = guiCreateStaticImage(0.16, 0.24, 0.65, 0.58, "data/infernus/default.png", true, Julian)
        InfernusIMG2 = guiCreateStaticImage(0.16, 0.24, 0.65, 0.58, "data/infernus/micra-v1.png", true, Julian)
        InfernusIMG3 = guiCreateStaticImage(0.16, 0.24, 0.65, 0.58, "data/infernus/info1.png", true, Julian)
        how_to = guiCreateLabel(0.21, 0.81, 0.52, 0.04, "Image Click Active Default Infernus", true, Julian)
        guiSetFont(how_to, "default-bold-small")
        guiLabelSetColor(how_to, 255, 143, 0)
        guiLabelSetHorizontalAlign(how_to, "center", false)
        guiLabelSetVerticalAlign(how_to, "center")
        Next = guiCreateStaticImage(0.53, 0.88, 0.08, 0.09, "data/img/next.png", true, Julian)
        Back = guiCreateStaticImage(0.36, 0.88, 0.08, 0.09, "data/img/back.png", true, Julian)
        guiSetVisible( InfernusIMG2, false )
        guiSetVisible( InfernusIMG3, false )
        guiSetVisible( Julian, false )
    end
)


function button_hover(aX, aY)
    if source == Back then
        guiStaticImageLoadImage( Back, "data/img/back2.png" )
        elseif source == Next then
            guiStaticImageLoadImage( Next, "data/img/next2.png" )
    end
end
addEventHandler( "onClientMouseEnter", root, button_hover)

function button_out(aX, aY)
    if source == Back then
        guiStaticImageLoadImage( Back, "data/img/back.png" )
        elseif source == Next then
            guiStaticImageLoadImage( Next, "data/img/next.png" )
    end
end
addEventHandler( "onClientMouseLeave", root, button_out)

function button_infernus()
        if source == Back then
        guiSetVisible( InfernusIMG, true )
        guiSetVisible( InfernusIMG3, false )
        guiSetVisible( InfernusIMG2, false )
        elseif source == Next then
            guiSetVisible( InfernusIMG, false )
            guiSetVisible( InfernusIMG2, true )
            guiSetVisible( InfernusIMG3, true )
            elseif source == InfernusIMG2 then
            txd = engineLoadTXD ( "data/model/infernus.txd" )
            engineImportTXD ( txd, 411 )
            dff = engineLoadDFF ( "data/model/infernus.dff" )
            engineReplaceModel ( dff, 411 )
            elseif source == InfernusIMG3 then
            txd = engineLoadTXD ( "data/model/infernus1.txd" )
            engineImportTXD ( txd, 411 )
            dff = engineLoadDFF ( "data/model/infernus1.dff" )
            engineReplaceModel ( dff, 411 )
            elseif source == InfernusIMG then
            engineRestoreModel( 411 )
    end
end
addEventHandler( "onClientGUIClick", root, button_infernus)

function bind()
    local IsWindowVisible = guiGetVisible(Julian)
    if (IsWindowVisible == true) then   
        guiSetVisible(Julian, false)
        guiSetInputEnabled(false)
        showCursor(false)
    end
    if (IsWindowVisible == false) then
        guiSetVisible(Julian, true)      
        showCursor(true)
    end
end
 
bindKey("o", "down", bind)

 

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...