#Redeem System

1 messages · Page 1 of 1 (latest)

cursive knoll
#

I already completed it, i just want to make it cannot be claimed again after player already claimed.

forceShow(player, form).then(result => {
        const t = result.formValues[0];
        if (code[t]) {
            player.runCommandAsync(`give @s ${code[t]}`)
            player.runCommandAsync("playsound random.toast @s")
            player.addTag(`${code[t]}`)
        } else {
            player.tell("§cWrong/Invalid code!")
            player.runCommandAsync("playsound note.bass @s")
        }
        if (player.hasTag(code[t]) == t) {
            player.tell("§cAlready redeemed!")
            player.runCommandAsync("playsound note.bass @s")
        }
})

I tried this, it don't work

junior mauve
#

what is (player.hasTag (code[t]) == t)?

#

Remove the == t to make it work

cursive knoll
#

no