#Unshow button if tag
1 messages · Page 1 of 1 (latest)
function openMainMenu(player) {
const form = new ActionFormData()
form.title(`§t§lLumeria Menu`)
form.body(`Select category`)
form.button(`Menu1`, `textures/ui/menu1`)
form.button(`§3§lSpawn`, `textures/ui/spawn`)
form.button(`Menu3`, `textures/ui/menu3`)
{if (!player.hasTag(`Player`))form.button(`§4§lRules`,`textures/ui/rules`)}
form.show(player) .then(result => {
switch (result.selection) {
case 0:
Menu1(player);
break;
case 1:
teleportToSpawn(player);
break;
case 2:
Menu3(player);
break;
case 3:
if (result.selection == 3 && !player.hasTag(`Player`)) showRules(player)
break;
}
});
}
i tryed like this for showRules
I have no error in vsc there is no log, but my menu does not open
if (statment) { /** action here */ } ☑️
{ if() } ❌
@vivid wind
if (!player.hasTag(`Player`)) {
form.button(`§4§lRules`,`textures/ui/rules`)
}
I also had this idea in mind
ty
dosn't work's
i can't open menu
Errors?
so u have an idea ?
I was looking
add the default case in your switch
default:
break;
Then try again
nothing more
Eh?
dosn't work's too
Try it
that do nothing more
yes
Then maybe it is something of your other code
gdtrusfdjhgdjty