Jump to content

Image button


Msypon

Recommended Posts

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

Edited by Guest
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 ;)

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