[Plugin] BTNCountdown [Full Release]

This is my basic countdown script for any BeamMP server.
Features are as follows:

  • Will not start a countdown if a countdown is currently active

  • No permissions need to start the countdown, any player can access this command

  • /countdown to trigger countdown

  • Display in the server log when it is loaded

  • Configurable countdown length

Download: Release BTNCountdown · BTSmoke/BeamMP · GitHub

Install:

  1. Simply download the plugin
  2. Unzip BTDCountown.zip
  3. Place the BTDCountdown folder into your Server folder located in Resources
  4. Restart your server
1 Like

Thanks for your contribution (:

I would like to point out two things.

  1. This function doesnt exists https://github.com/BTSmoke/BeamMP/blob/main/BTNCountdown.lua#L19 therefore yielding a lua error if a player sends the /coords command

  2. startCountdown() is blocking the state for the duration of the countdown. If a player sends /countdown this state will block the onChatMessage event for the whole time the countdown is running. If multiple scripts listen to that event and one is blocking it then no other can execute it until its unblocked. This possibly also means that a player could spam the /countdown command and this way trigger the countdown over and over again even far after they have left the server already.

Heres a different approach https://github.com/OfficialLambdax/BeamMP-ServerScripts/blob/main/SimpleCountdown/Server/SimpleCountdown/main.lua
It returns with every left time call, so that neither this or any by it registered events is blocked for the duration of the countdown.