Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature : Add cooldown mechanism to DZLLoadOutListener #15

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Underewarrr
Copy link

@Underewarrr Underewarrr commented May 18, 2024

Added a cooldown mechanism to the DZLLoadOutListener class to prevent players from accessing the loadout more than once every hour.

  • Introduced a map to store the last access times of players.
  • Implemented IsCooldownActive() method to check if the cooldown period is active.
  • Implemented UpdatePlayerAccessTime() method to update the player's last access time.
  • Modified OnRPC() method to incorporate cooldown checks before equipping the loadout.

Missing:
Translation String.

Make it better : Add to loadout config variable to control cd time.

@ihr-it-projekt
Copy link
Owner

@Underewarrr
Sorry that i replay so late. I have not seen it. Thx for your contribution... I like the idee, but as you already have mentioned... pls add it to loadout config. not everybody wants to have that cooldown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants