About Timers
A straightforward timer plugin that displays customizable countdown timers in the game interface (top right corner). Perfect for coordinating events, announcing restarts, or managing custom countdowns.
Features:
- Custom timer display in the game UI
- Automatic server restart timer (optional)
- Console and chat command support
- Customizable UI (colors, text size, transparent background)
- Integrated permission system
- Targeted timers: you can display timers only to specific players or groups
Commands:
Chat
- /timer start seconds "text" - Starts a new timer for all players
- /timer start seconds "text" steamid @group - Starts a timer for a spefic player or group (you can use both steamid and group in the same argument) --> /timer start 600 "Event start" 76561198086436188 @VIP (it will show to the VIP group and the specified player)
- /timer stop - Stop current timer
Rcon
- timer.start seconds "text" - Starts a new timer for all players
- timer.start seconds "text" steamid @group - Starts a timer for a spefic player or group (you can use both steamid and group in the same argument) --> timer.start 600 "Event start" 76561198086436188 @VIP (it will show to the VIP group and the specified player)
- timer.stop console
Configuration:
- Customizable background color
- Customizable text color
- Adjustable font size
- Optional transparent backgroun
- Toggleable automatic restart timer
{ "BackgroundColor": "#CC000000", "TextColor": "#FFFFFF", "EnableRestartTimer": true, "TransparentBackground": false, "FontSize": 20 }
Developer Hooks
// Called when a timer starts void OnTimerStarted(int seconds, string text) // Called when a timer is manually stopped void OnTimerStopped() // Called when a timer naturally completes void OnTimerCompleted()
Public Methods for Other Plugins
// Start a new timer bool StartTimerFromPlugin(int seconds, string text = "", List<string> steamIds = null, List<string> groups = null) // Example: var timersPlugin = plugins.Find("Timers"); var steamIds = new List<string> { "76561198123456789" }; var groups = new List<string> { "vip" }; timersPlugin?.Call("StartTimerFromPlugin", 60, "Event", steamIds, groups); // Stop the current timer bool StopTimerFromPlugin() // Example: timersPlugin?.Call("StopTimerFromPlugin"); // Get remaining time TimeSpan? GetRemainingTime() // Example: var remaining = timersPlugin?.Call("GetRemainingTime") as TimeSpan?; // Get current timer text string GetCurrentTimerText() // Example: var text = timersPlugin?.Call("GetCurrentTimerText") as string;
Support:
For any support request: [email protected]