#HEY ! Is it possible to make a button clickable only 3 times per player, for a shop with deluxemanu
1 messages · Page 1 of 1 (latest)
use luckmperms or mastercooldown
I use luck perms and deluxe menus and tokenmanager
you can get a list of cooldown if use mastercooldown
Okay thx
in addition to this, you could also try using the meta from deluxemenus to store the amount of times the individual clicked it
not sure if mastercooldowns will do much here, but luckperms also has meta
using luckperms permissions (ex: clicked.1, clicked.2, clicked.3) would also work, but a little messier
I want for example that a player can buy 3 times 5 power, once he buy them 3 times, he can no longer
I can create 3 slots which each time gives a different permission but I do everything on a single slot
okay, permissions are good but I still recommend meta over permissions
If you want to put them all in 1 slot I can do that for you if you send the menu over, or I can also show you how to use dm meta
And what is meta?
it's a value stored to the player's data
so you could have a meta named item1-purchased that stores how many items they purchased so far
Can you run a test for me by chance?
/dm execute <your_name> [meta] add ITEM1-PURCHASED INTEGER 1
type that, see if you get any errors
then type /papi parse me %deluxemenus_meta_ITEM1-PURCHASED_INTEGER_50%
Ok I'm going to look at all this, and I have another problem, sometimes when I click on a menu it does not open, and sometimes it opens
'close':
material: BARRIER
slot: 24
priority: 5
update: true
hide_attributes: true
display_name: "&cRetour au menu"
material: barrier
slot: 49
display_name: '&cRetour au menu'
click_commands:
- '[sound] ENTITY_SNOW_GOLEM_DEATH'
- '[close]'
- '[openguimenu] menu_menu'
item1:
material: dirt
slot: 0
view_requirement: #view requirement, so the user can/cannot see the item
requirements:
meta:
type: '!has meta'
key: ITEM1-PURCHASED
meta_type: INTEGER
value: 3 # the max number of items the user can purchase
click_requirement: #click requirement, so the user can/cannnot click the item
requirements:
meta:
type: '!has meta'
key: ITEM1-PURCHASED
meta_type: INTEGER
value: 3 # the max number of items the user can purchase
deny_commands:
- '[message] you already bought 3 of these!' # just in case they somehow see the item, already having bought 3
click_commands:
- '[meta] add ITEM1-PURCHASED INTEGER 1' #adds 1 to the amount of items purchased
- '[close]'
@inland pumice this should work
well
the should depends on if this errors or not
Ok i try
thx
fyi if you did want to stack your items in 1 slot you need to use view requirements and priorities
Yeah
I have another problem, sometimes when I click on a menu it does not open, and sometimes it opens
you don't need [close] with [openguimenu]
idk if that is related
I try
also, unrelated, you have 2 display_names and 2 slots defined for htat item