Topic category: Advanced modding
Hello and welcome to my problem.
First of all my english isn't very good.(i hope you can understand it)
I wanted to make a "block" that can be "right klicked" and if the player right klicks it a Shop GUI would pop up.
In this gui is a button called "Sell".If the player press it a Item should be removed from his inventory in this case a Steel Bar (Mod item).
After the Player sold it he should get Money (in this case 10 Mineys) (Mineys is called the money in my mod).
But here the problem come.
First of all here is the "code"
It should consume the "Steel Bar" and after this it should give the Player 1 money.
After the player recieved the money the player shouldn be able to press the button again if he has no "Steel Bars" left in his inventory.
Here's a Video of the Problem.
I cant fix it on my own cus i dont have much skills in coding etc...
Help would be nice :)