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.
#Updating a gui item in deluxemenus depending on condition
1 messages · Page 1 of 1 (latest)
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
share you menu config using helpchat paste
?paste
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
Requested by: nob316 • paste
only the first item is done if needed you can provide an example on the basis of that item
means the '1':
something like this: https://paste.helpch.at/ubovabixur.lua
considering you have Luckperms installed. you also need Player expansion
/papi reload```
things you were missing:
- multiple items set to same slot with different priorities
- permission setup to give the player
claimed.1permission
i believe this is not the only way to make it work. there are many other ways
thanks so much, i already have player expansion downloaded
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
yeah, so if you need such thing, then you can set a temporary permission
alright and how to do that for 24h?
/lp user %player_name% permission settemp claimed.1 true 24h
try this 👆
and this is configurable? like suppose i want it for 2 weeks, so i would write 14d?
yes, you can read more about that here -> https://luckperms.net/wiki/Permission-Commands#lp-usergroup-usergroup-permission-settemp-node-truefalse-duration-temporary-modifier-context
if the server is offline while the temp permission was still ongoing, would the countdown still go down?
🤔, no idea 😅
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
happy menuing! 🙂