How do I make it so that when the set amount of players is not met, the cooldown doesnt take effect until the command is successfully executed when the right amount of players is met?
Here is the skirpt that I wrote
command giveall-lootbox:
cooldown: 30 minute
cooldown message: &cYou have to wait %remaining time% before using that again!
cooldown bypass: keyall.lootbox.bypass.cooldown
permission: keyall.lootbox
permission message: &cYou don't have permission to use that
trigger:
if size of all players >= 4:
execute console command "excellentcrates key giveall lootbox 1"
broadcast "&bEveryone has been given 1 lootbox key by &6%player%"
else:
message "&cThere need to be 4 players online to give a lootbox!"
command giveall-lootbox-2:
cooldown: 60 minute
cooldown message: &cYou have to wait %remaining time% before using that again!
cooldown bypass: keyall.lootbox2.bypass.cooldown
permission: keyall.lootbox2
permission message: &cYou don't have permission to use that
trigger:
if size of all players >= 4:
execute console command "excellentcrates key giveall lootbox 2"
broadcast "&bEveryone has been given 2 lootbox keys by &6%player%"
else:
message "&cThere need to be 4 players online to give lootboxes!"
Here is the skirpt that I wrote
command giveall-lootbox:
cooldown: 30 minute
cooldown message: &cYou have to wait %remaining time% before using that again!
cooldown bypass: keyall.lootbox.bypass.cooldown
permission: keyall.lootbox
permission message: &cYou don't have permission to use that
trigger:
if size of all players >= 4:
execute console command "excellentcrates key giveall lootbox 1"
broadcast "&bEveryone has been given 1 lootbox key by &6%player%"
else:
message "&cThere need to be 4 players online to give a lootbox!"
command giveall-lootbox-2:
cooldown: 60 minute
cooldown message: &cYou have to wait %remaining time% before using that again!
cooldown bypass: keyall.lootbox2.bypass.cooldown
permission: keyall.lootbox2
permission message: &cYou don't have permission to use that
trigger:
if size of all players >= 4:
execute console command "excellentcrates key giveall lootbox 2"
broadcast "&bEveryone has been given 2 lootbox keys by &6%player%"
else:
message "&cThere need to be 4 players online to give lootboxes!"
Last edited: