Raised This Month: $51 Target: $400
 12% 

[Any] Exec on Empty (v1.7.3, 2022-12-04)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
llamasking
Junior Member
Join Date: Jul 2020
Plugin ID:
7202
Plugin Version:
v1.7.3
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    6 
    Plugin Description:
    A very simple plugin that executes a specified config whenever everyone on a server leaves.
    Old 07-11-2020 , 22:13   [Any] Exec on Empty (v1.7.3, 2022-12-04)
    Reply With Quote #1

    Description
    A very simple plugin I created since Empty Server Map Restarter didn't work for me and I wanted to learn SourcePawn. A lot of this plugin's code is similar to that one since I used it as an example of how to get most things done.

    ConVars
    • sm_empty_enabled - Whether or not the plugin is enabled.
    • sm_empty_config - The config to run when the server is empty.
    • sm_empty_version - The plugin's version.

    Known Issues
    When sv_hibernate_when_empty is 1 and sv_hibernate_postgame_delay is 0, the plugin apparently breaks.

    Changelog
    Quote:
    v1.7.3 (2022-12-04)
    - Fix some build errors/warnings.

    v1.7.2 (2020-09-12)
    - Fix compilation errors.
    - Make version cvar notify on change.
    - Scripting changes.

    v1.7.1 (2020-09-01)
    - Exact same as before but actually works this time.

    v1.7 (2020-09-01)
    - Fix error when everyone leaves

    v1.6 (2020-08-31)
    - Remove thefuck command since the disconnect bug was fixed in last version
    - Fix bug where the plugin will execute when a map change happens

    v1.5 (2020-08-19)
    - I think I actually fixed the bug where players who disconnected before loading in would cause the plugin to break.
    - Remove debug mode since it's not useful and a waste of space. sm_empty_thefuck
    - General code cleanup

    v1.4 (2020-08-19) (Not released on AM)
    - Add to the fake client filter to try to fix above bug
    - General code cleanup

    v1.3 (2020-18-18 ) (Not released on AM)
    - Add debug mode and sm_empty_thefuck command for future debugging.

    v1.2 (2020-08-14)
    - Fix "Client index 0 is invalid" error.

    v1.1 (2020-07-12)
    - The name of your config is no longer limited to 5 characters.

    v1.0 (2020-07-11)
    - Initial release
    Credits
    Attached Files
    File Type: sp Get Plugin or Get Source (exec_on_empty.sp - 109 views - 2.8 KB)
    __________________

    Last edited by llamasking; 12-29-2022 at 04:48.
    llamasking is offline
    Blacktail92
    New Member
    Join Date: Feb 2020
    Old 02-06-2021 , 19:15   Re: [Any] Exec on Empty (v1.7.1, 2020-09-01)
    Reply With Quote #2

    Doesn't work if sv_hibernate_when_empty 1 AND sv_hibernate_postgame_delay 0. However this plugin does: https://forums.alliedmods.net/showthread.php?p=590466

    Last edited by Blacktail92; 02-07-2021 at 08:24.
    Blacktail92 is offline
    llamasking
    Junior Member
    Join Date: Jul 2020
    Old 02-07-2021 , 15:31   Re: [Any] Exec on Empty (v1.7.1, 2020-09-01)
    Reply With Quote #3

    Quote:
    Originally Posted by Blacktail92 View Post
    Doesn't work if sv_hibernate_when_empty 1 AND sv_hibernate_postgame_delay 0. However this plugin does: https://forums.alliedmods.net/showthread.php?p=590466
    I figure this is for CS:GO. I unfortunately do not play that, nor do I have the server installed to test it. For now, I'll note this issue in OP, but I don't have the time to fix it at the moment.

    Since that plugin works, I suggest you use that instead.
    __________________
    llamasking is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 07:08.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode