Jump to content

Image button


Msypon

Recommended Posts

Posted
guiCreateStaticImage 
guiCreateLabel 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted (edited)
myImage = guiCreateStaticImage(100, 100, 100, 100, "path", false) 
  
addEventHandler("onClientGUIClick", myImage, 
function() 
   --your code 
end) 

Edited by Guest
Posted

Set the parent of the image to the progress bar.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

With guieditor is easy, you can just right click on the progress bar and create the image.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

onClientGUIClick event is on all GUI elements even the image, not only the button,

and here's how to make an image with guieditor

1- your image must be PNG

2- put your image into guieditor.zip / images

3- go to meta.xml into the zip file

4- and do like this

    "images/imageName.PNG"/> 

put this code down here if you're a new guieditor user

"images/shruk.png"/> 

for sure

20js0o6.jpg

onClientGUIClick event is on all GUI elements even the image, not only the button,

example :

local myImage = guiCreateStaticImage(240,20,229,261,"Msypon.PNG",false) -- create the image 
  
function Msypon() 
    outputChatBox(" Msypon Msypon Msypon") -- out put to chat box this message 
end 
addEventHandler("onClientGUIClick", myImage, Msypon) -- when you click on the picture then the function will work. 
  

check it out for your self

good luck ;)

F4MZM4.gif

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