Monthly Target: $400 Donations: $147
 36% 

Execute Configs 1.0 (Updated 08/12/09)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: Netherlands
Plugin ID:
302
Plugin Version:
1.0
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    43 
    Plugin Description:
    Execute configs on certain events.
    Old 02-27-2008 , 11:15   Execute Configs 1.0 (Updated 08/12/09)
    Reply With Quote #1

    This plugin executes configs when there are either a certain amount of clients on, a certain event occurs, a certain round starts or when there are a certain amount of minutes left on the map. You can use this to disable alltalk above x clients, or to change the map when the timelimit hits, etc. The configs of course go into the cfg folder and the console variables are as follows:

    sm_executeconfigs_enabled (0/1, def 1)
    Enable/disable executing configs. The plugin will keep counting the rounds and timeleft when it's disabled, but it will only actually execute the configs when it's enabled.

    sm_executeconfigs_include_bots
    (0/1, def. 1)
    Enable/disable including bots when counting number of clients. This will allow you to disable counting fake clients as normal clients.

    sm_executeconfigs_include_spec
    (0/1, def. 1)
    Enable/disable including spectators when counting number of clients. This will allow you to disable counting spectators as normal clients.

    sm_executeconfigs_reload
    Server command to reload the configs from executeconfigs.txt.


    To customize which configs get executed, put the attached executeconfigs.txt in the configs folder. It contains some examples of which I'll explain one here:

    Code:
    "Configs"
    {
        "*"
        {
            "clients:0"    "10:emptyserver.cfg"
        }
    }
    This means that for all maps, when there are 0 clients on, emptyserver.cfg will get executed after 10 seconds. The delay is for when someone joins within those 10 seconds, it will look for a config for when there is 1 client on, and if found it will execute that line. If it wasn't found it will continue to execute emptyserver.cfg, so if you're changing the map in emptyserver.cfg, make sure it will stop doing that by creating an empty config for clients:1.

    I've tested this on TF2, I'm sure it works on others too but bug reports are always welcome

    Changelog
    • 1.0
      • Rewrote most of the code to allow for easier additions.
      • Added support for map specific configs.
      • Added sm_executeconfigs_reload.
    • 0.5.3
      • Fixed invalid timer handle errors.
    • 0.5.2
      • Removed a stray LogMessage.
    • 0.5.1
      • Small fix when counting number of clients.
    • 0.5
      • Fixed timer errors.
      • Added sm_executeconfigs_include_spec.
      • Does not execute the found config if it is the last config that was executed.
    • 0.4
      • Initial public release.
    Attached Files
    File Type: sp Get Plugin or Get Source (executeconfigs.sp - 2722 views - 6.8 KB)
    File Type: txt executeconfigs.txt (375 Bytes, 2276 views)
    __________________

    Last edited by DJ Tsunami; 06-11-2011 at 13:01.
    DJ Tsunami is offline
    dann
    Senior Member
    Join Date: Nov 2007
    Old 02-28-2008 , 21:36   Re: Execute Configs
    Reply With Quote #2

    could you add something like this?

    sm_executeconfigs_include_spectators 0/1
    dann is offline
    John Ford
    Member
    Join Date: Apr 2006
    Location: Earth
    Old 02-29-2008 , 14:01   Re: Execute Configs
    Reply With Quote #3

    Let me get this straight. The emptyserver.cfg goes in the /cfg folder?
    To load a new or the next map what would I enter? I tried using your change2nextmap.smx plugin and got this error.

    CModelLoader::Map_IsValid: No such map 'maps/Pending Vote.bsp'
    L 02/29/2008 - 12:52:17: [change2nextmap.smx] Map Name "Pending Vote" Invalid.

    I like the idea of the server rotating through maps even though there are no clients. I just don't know how to invoke that map change.

    Last edited by John Ford; 02-29-2008 at 14:03. Reason: added info
    John Ford is offline
    DJ Tsunami
    DJ Post Spammer
    Join Date: Feb 2008
    Location: Netherlands
    Old 02-29-2008 , 17:06   Re: Execute Configs
    Reply With Quote #4

    dann: sure, I can add that. I'm assuming that's spectators that aren't bots?

    John: yes, the emptyserver.cfg goes into the cfg folder. To change to the next map just have the command sm_change2nextmap in there. It looks like you're using the mapchooser plugin which initiates a vote at the end of the map, and before that vote is finished no next map is set (and ofcourse when there are no clients on noone ever votes). I'll have a look at how you can fix that.
    __________________
    DJ Tsunami is offline
    dann
    Senior Member
    Join Date: Nov 2007
    Old 03-01-2008 , 07:38   Re: Execute Configs
    Reply With Quote #5

    yes actual spectators, not bots.

    thanks
    dann is offline
    John Ford
    Member
    Join Date: Apr 2006
    Location: Earth
    Old 03-01-2008 , 09:10   Re: Execute Configs
    Reply With Quote #6

    I removed the mapchooser plugin. When I use sm_change2nextmap the console tells me unknown command. If that is any help?
    John Ford is offline
    DJ Tsunami
    DJ Post Spammer
    Join Date: Feb 2008
    Location: Netherlands
    Old 03-01-2008 , 15:21   Re: Execute Configs
    Reply With Quote #7

    Type "sm plugins list" and make sure it's loaded, if it is it should work...

    Edit: oh, and it has to be ran on the server console. So through rcon if you're executing it in-game.
    __________________

    Last edited by DJ Tsunami; 03-01-2008 at 15:24.
    DJ Tsunami is offline
    arm5ky
    Member
    Join Date: Dec 2007
    Old 03-03-2008 , 07:25   Re: Execute Configs
    Reply With Quote #8

    Doesnt work on our tf2 server :

    L 03/03/2008 - 11:00:26: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 11 on
    L 03/03/2008 - 11:02:54: [SM] Native "KillTimer" reported: Invalid timer handle 2380114 (error 1)
    L 03/03/2008 - 11:02:54: [SM] Debug mode is not enabled for "executeconfigs.smx"
    arm5ky is offline
    FroL
    Member
    Join Date: Jul 2007
    Old 03-05-2008 , 14:57   Re: Execute Configs
    Reply With Quote #9

    thx for usefull plugin!
    __________________

    3SMedia #1 | classic gameplay | tick 100 (81.25.49.19:27015)
    3SMedia #2 | pro gaming | tick 100 (81.25.49.19:27016)
    3SMedia #3 | deathmatch | tick 100 (81.25.49.19:27017)
    Sorry for my VERY bad english .
    FroL is offline
    FroL
    Member
    Join Date: Jul 2007
    Old 03-05-2008 , 16:49   Re: Execute Configs
    Reply With Quote #10

    But what is it?
    Code:
    L 03/05/2008 - 23:44:45: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:44:45: [SM]   [1]  Line 73, executeconfigs.sp::OnClientPutInServer()
    L 03/05/2008 - 23:44:47: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:44:47: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:44:47: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:44:47: [SM]   [1]  Line 73, executeconfigs.sp::OnClientPutInServer()
    L 03/05/2008 - 23:44:47: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:44:47: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:44:47: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:44:47: [SM]   [1]  Line 73, executeconfigs.sp::OnClientPutInServer()
    L 03/05/2008 - 23:44:47: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:44:47: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:44:47: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:44:47: [SM]   [1]  Line 73, executeconfigs.sp::OnClientPutInServer()
    L 03/05/2008 - 23:44:47: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:44:47: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:44:47: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:44:47: [SM]   [1]  Line 73, executeconfigs.sp::OnClientPutInServer()
    L 03/05/2008 - 23:44:47: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:44:47: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:44:47: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:44:47: [SM]   [1]  Line 73, executeconfigs.sp::OnClientPutInServer()
    L 03/05/2008 - 23:44:47: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:44:47: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:44:47: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:44:47: [SM]   [1]  Line 73, executeconfigs.sp::OnClientPutInServer()
    L 03/05/2008 - 23:44:47: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:44:47: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:44:47: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:44:47: [SM]   [1]  Line 73, executeconfigs.sp::OnClientPutInServer()
    L 03/05/2008 - 23:44:47: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:44:47: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:44:47: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:44:47: [SM]   [1]  Line 73, executeconfigs.sp::OnClientPutInServer()
    L 03/05/2008 - 23:45:06: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:45:06: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:45:06: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:45:06: [SM]   [1]  Line 77, executeconfigs.sp::OnClientDisconnect()
    L 03/05/2008 - 23:45:06: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:45:06: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:45:06: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:45:06: [SM]   [1]  Line 77, executeconfigs.sp::OnClientDisconnect()
    L 03/05/2008 - 23:45:06: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:45:06: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:45:06: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:45:06: [SM]   [1]  Line 77, executeconfigs.sp::OnClientDisconnect()
    L 03/05/2008 - 23:45:06: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:45:06: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:45:06: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:45:06: [SM]   [1]  Line 77, executeconfigs.sp::OnClientDisconnect()
    L 03/05/2008 - 23:45:06: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:45:06: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:45:06: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:45:06: [SM]   [1]  Line 77, executeconfigs.sp::OnClientDisconnect()
    L 03/05/2008 - 23:45:06: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:45:06: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:45:06: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:45:06: [SM]   [1]  Line 77, executeconfigs.sp::OnClientDisconnect()
    L 03/05/2008 - 23:45:06: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:45:06: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:45:06: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:45:06: [SM]   [1]  Line 77, executeconfigs.sp::OnClientDisconnect()
    L 03/05/2008 - 23:45:06: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:45:06: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:45:06: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:45:06: [SM]   [1]  Line 77, executeconfigs.sp::OnClientDisconnect()
    L 03/05/2008 - 23:45:06: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:45:06: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:45:06: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:45:06: [SM]   [1]  Line 77, executeconfigs.sp::OnClientDisconnect()
    L 03/05/2008 - 23:45:06: [SM] Native "KillTimer" reported: Invalid timer handle ea00e3 (error 3)
    L 03/05/2008 - 23:45:06: [SM] Displaying call stack trace for plugin "executeconfigs.smx":
    L 03/05/2008 - 23:45:06: [SM]   [0]  Line 99, executeconfigs.sp::ExecClientsConfig()
    L 03/05/2008 - 23:45:06: [SM]   [1]  Line 77, executeconfigs.sp::OnClientDisconnect()
    executeconfigs_cfgs.txt

    Code:
    Configs
    {
        "clients:1"    "10:welcome.cfg"
        "clients:2"    "0:8PlayersToStart.cfg"
        "clients:3"    "0:7PlayersToStart.cfg"
        "clients:4"    "0:6PlayersToStart.cfg"
        "clients:5"    "0:5PlayersToStart.cfg"
        "clients:6"    "0:4PlayersToStart.cfg"
        "clients:7"    "0:3PlayersToStart.cfg"
        "clients:8"    "0:2PlayersToStart.cfg"
        "clients:9"    "0:1PlayersToStart.cfg"
        "clients:10"    "15:mixstart.cfg"
    }
    __________________

    3SMedia #1 | classic gameplay | tick 100 (81.25.49.19:27015)
    3SMedia #2 | pro gaming | tick 100 (81.25.49.19:27016)
    3SMedia #3 | deathmatch | tick 100 (81.25.49.19:27017)
    Sorry for my VERY bad english .

    Last edited by FroL; 03-05-2008 at 16:53.
    FroL is offline
    Reply


    Thread Tools
    Display Modes

    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 22:28.


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