function page8(player) {
const form = newActionFormData
form.title("§eLegends §8GUI");
form.description("§fDirt: §a$100 §fSand: §a$250 §fWood: §a$500 §fGravel: §a$1.00K §fStone: §a$2.50K §fCoal: §a$5.00K §fCopper: §a$10.00K §fIron: §a$25.00K §fGold: §a$50.00K §fRedstone: §a$100.00K §fLapis: §a$250.00K §fDiamond: §a$500.00K §fQuartz: §a$1.00M §fAncient Debris: §a$2.50M §fGlass: §a$5.00M");
form.button("§dDirt");
form.button("§dSand");
form.button("§dLog");
form.button("§dGravel");
form.button("§dStone");
form.button("§dCoal");
form.button("§dCopper");
form.button("§dIron");
form.button("§dGold");
form.button("§dRedstone");
form.button("§dLapis");
form.button("§dDiamond");
form.button("§dQuartz");
form.button("§dAncient Debris");
form.button("§dGlass");
form.button("§6Last Page §8<-");
form.button("§4§lClose");
if (response.selection == 0) {
player.runCommandAsync("");
}
}
#help me
1 messages · Page 1 of 1 (latest)
if (response.selection == 0) {
player.runCommandAsync("");
}
i want to make them have a tag to purchase sand
so
if (response.selection == 1) {
player.runCommandAsync("");
}
@bright lodge
const form = new ActionFormData();```
You need
```js
form.show(player).then(
(response) => { if (response.selection == 0) { } }```
hmm so what seems to be the problem?
.
player.hasTag()
i know
but where
i know its not
if (response.selection == 1) && player.hastag {
player.runCommandAsync("");
}
if (player.hasTag(<tag?: String>) && response.selection == 0) { }```
ye?
how do i make it so they cant go in negative money
function page8(player) {
const form = newActionFormData
const money = getScore(player, "money");
form.title("§eLegends §8GUI");
form.description("§fDirt: §a$100 §fSand: §a$250 §fWood: §a$500 §fGravel: §a$1.00K §fStone: §a$2.50K §fCoal: §a$5.00K §fCopper: §a$10.00K §fIron: §a$25.00K §fGold: §a$50.00K §fRedstone: §a$100.00K §fLapis: §a$250.00K §fDiamond: §a$500.00K §fQuartz: §a$1.00M §fAncient Debris: §a$2.50M §fGlass: §a$5.00M");
form.button("§dDirt");
form.button("§dSand");
form.button("§dLog");
form.button("§dGravel");
form.button("§dStone");
form.button("§dCoal");
form.button("§dCopper");
form.button("§dIron");
form.button("§dGold");
form.button("§dRedstone");
form.button("§dLapis");
form.button("§dDiamond");
form.button("§dQuartz");
form.button("§dAncient Debris");
form.button("§dGlass");
form.button("§6Last Page §8<-");
form.button("§4§lClose");
if (response.selection == 0) {
player.runCommandAsync("");
}
if (player.hasTag("Dirt") && response.selection == 1) {
player.runCommandAsync("");
}
}
negative money? you using getScore?
yeah i am
if (player.hasTag("<tag?: String>") && getScore(<Player>, "<Objective>") != <Score> && response.selection == 0) { }```
ight thanks
idk how to use operators lmao
yeh i guess try it
ight
U can use this tho
Player.runCommandAsync('give @s[scores={objectives=score}] item')
Player.runCommandAsync('scoreboard players remove @s[scores={objectives=score}] objective score')
form.body
instead
form.description
its not description?
thanks