Jump to content

[Help] Image save


Miami

Recommended Posts

Hello, My problem is that image save. Players join, quit image save. Someone help me? 

local img = false

Radar = guiCreateStaticImage(0.33, 0.15, 0.33, 0.06, "on.png", true, Menu)


    function button()
        if source == Radar and img == true then
            guiStaticImageLoadImage( Radar, "on.png" )
    --Code
        img = false
        
        elseif source == Radar and img == false then
            guiStaticImageLoadImage( Radar, "off.png" )
    --Code
        img = true
   		end
  end

 

Link to comment
1 hour ago, Miami said:

Hello, My problem is that image save. Players join, quit image save. Someone help me? 


local img = false

Radar = guiCreateStaticImage(0.33, 0.15, 0.33, 0.06, "on.png", true, Menu)


    function button()
        if source == Radar and img == true then
            guiStaticImageLoadImage( Radar, "on.png" )
    --Code
        img = false
        
        elseif source == Radar and img == false then
            guiStaticImageLoadImage( Radar, "off.png" )
    --Code
        img = true
   		end
  end

 

Try to use xml to save the current selected state

https://wiki.multitheftauto.com/wiki/XmlCreateFile

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