Jump to content

I want to help


iiv03

Recommended Posts

2 minutes ago, svon1 said:

Can you normally say what you need? Because i really don't undestand you.o.O

I just want you to want me to work the board and I have made it a button to open when the player and when the programming in the buttons I want the player to press the left button change the image to the left and if the player pressure right back Previous image

153416116971251.png

Link to comment

oh how ? can u give me link in wiki or script easy please ?

9 minutes ago, WorthlessCynomys said:

You have to store the images in a table and make a pointer that indicates which image is shown at the moment. On the click of the button, you change that pointer's value in the right direction, then redraw the image.

oh how ? can u give me link in wiki or script easy please ?

Link to comment
Just now, liwahadri said:

oh how ? can u give me link in wiki or script easy please ?

Images = {
  -- You store the images here. Like:
  "Image.png",
  "Image2.png",
  "Image3.png", -- and so on
};

local currentImage = 1;

local image = guiCreateStaticImage(x, y, width, height, Images[currentImage]);

addEventHandler("onClientGUIClick", root,
  function()
  	if (source == theButtonElement) then
      currentImage = currentImage+1;
      guiStaticImageLoadImage(image, Images[currentImage]);
    end
  end
);

This is totally basic. It won't work in this exact form, but It should give you an idea on how to do it.

  • Confused 1
Link to comment
2 hours ago, WorthlessCynomys said:

Images = {
  -- You store the images here. Like:
  "Image.png",
  "Image2.png",
  "Image3.png", -- and so on
};

local currentImage = 1;

local image = guiCreateStaticImage(x, y, width, height, Images[currentImage]);

addEventHandler("onClientGUIClick", root,
  function()
  	if (source == theButtonElement) then
      currentImage = currentImage+1;
      guiStaticImageLoadImage(image, Images[currentImage]);
    end
  end
);

This is totally basic. It won't work in this exact form, but It should give you an idea on how to do it.

thanks here : x, y, width, height,

Just Here I put coordinates in guiStaticImage? Which I have? Will it work?

Link to comment
4 hours ago, Keiichi1 said:

Why don't you implement the code Worthless gave you into your code, you already have? It's possible with some basic lua knowledge.

I do not understand

8 hours ago, WorthlessCynomys said:

I don't really understand what you are trying to say.

I would tell you how if I took the position of the button right or left and how I set it in the script that you gave me to agree with the button with its image means if you press the button change its image how?

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