#Updating a gui item in deluxemenus depending on condition

1 messages · Page 1 of 1 (latest)

tropic snow
#

So basically i have a daily rewards menu with a cooldown, i want the gui to change the custom model data of that gui item once its clicked(assuming user isnt on cooldown) only for that user and then after 24hours again change it back to the original model data
and if they are on cooldown it shouldnt update ofc. I would really appreciate a working example if possible.

#

when they first open the gui it should default to the original model data and it should only change (if clicked) for 24 hours for that user and then revert back unless they again click

ornate bramble
#

?paste

keen girderBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

tropic snow
#

only the first item is done if needed you can provide an example on the basis of that item

#

means the '1':

ornate bramble
#

things you were missing:

  • multiple items set to same slot with different priorities
  • permission setup to give the player claimed.1 permission
#

i believe this is not the only way to make it work. there are many other ways

tropic snow
#

i looked into the file and i see there is the permission given once its claimed, but it wont go away in 24h

#

is there a command to take the permission away in 24h

#

means 86400s

ornate bramble
#

yeah, so if you need such thing, then you can set a temporary permission

tropic snow
#

alright and how to do that for 24h?

ornate bramble
#

/lp user %player_name% permission settemp claimed.1 true 24h
try this 👆

tropic snow
#

and this is configurable? like suppose i want it for 2 weeks, so i would write 14d?

ornate bramble
tropic snow
#

if the server is offline while the temp permission was still ongoing, would the countdown still go down?

ornate bramble
#

🤔, no idea 😅

tropic snow
#

oh guess i have to try it and see

#

but thank you so much for the help with this, i couldnt find a solution anywhere

tropic snow
#

thanks so much for thehelp

ornate bramble
#

happy menuing! 🙂