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

Advanced Day/Time Configs


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BlackMilk
Veteran Member
Join Date: Jun 2007
Old 07-18-2007 , 08:31   Advanced Day/Time Configs
Reply With Quote #1

Request, I need a specific type of plugin and was wondering if someone could get me this.

What I'm looking for is a plugin which lets me set cvars, plugins (enabled/disabled), executable commands and maprotations not only per day, but on specific times.

To help you on your way, the plugin Daily Server Configs by BigBaller is the basic version of what I need, but it's missing some features. I'll post an example of what I need down below.

(for reference, check Daily Server Configs, as that, in a figure of speech, is the "skeleton" of my request)

Example addons/amxx/configs/daily_cfgs/Mon.cfg:

hostname "Somerandomclan Pub 1 Monday blablabla"
plugin1 disabled
plugin2 disabled
cvar1 "value1"
cvar2 "value1"


"13:00" "14:59"
hostname "Somerandomclan Pub 1 Monday plugin1name"
plugin1 enabled
plugin2 disabled
cvar1 "value2"
cvar2 "value1"


"15:00" "16:59"
hostname "Somerandom clan Pub 1 Monday plugin2name"
plugin1 disabled
plugin2 enabled
cvar1 "value1"
cvar2 "value2"

The blue part would be normal usage of the config files, those settings are active at any time besides the specified times (of which the examples are in red and green).

The red part is one example of specifying a "block" of time in which different settings are loaded. The plugins part does the obvious and cvars too I suppose.

The green part is different again, with another plugin enabled (in my case that'd be a mod) and the other disabled, and cvars with yet different values.

As for the maps, they would be in another folder, but again with file names such as Sun.cfg, Mon.cfg etc.
So continuing with Mon.cfg in the MAPS folder part of the configuration plugin...

Example addons/amxx/configs/daily_map_cfgs/Mon.cfg:

de_dust
de_aztec
de_train
cs_italy
cs_militia
cs_office


"13:00" "14:59"
de_dust_cz
de_aztec_cz
de_train_cz
cs_italy_cz
cs_militia_cz
cs_office_cz


"15:00" "16:59"
helms_deep_ag
de_simpsons
de_wallmart
starwars
cs_bigcity
awp_duckhunt

To make it more understandable: the coloured sections here correspond with those above which are in the other config files. Blue corresponds to the "default" settings of that day, so "normally" those 6 non-custom/non_cz maps would be played.
From 13:00 to 14:59 de _cz versions of those maps would make up the maprotation, and from 15:00 to 16:59 some custom maps would be rotated instead.

Ofcourse, keep in mind that plugin1, value1, cvar1 etc. are all just gibberish examples of whatever one may put in.

Lastly, in each (non-map-)config file the ability should be present to execute commands on certain times. For example:

"13:00" amx_map as_oilrig
or
"15:00" sv_restartround 1
============================
Above plugin is what I need specifically for my 2 new servers, and what many people might also like due to it's diversity, it shouldn't be too hard to do since it's nothing fancy, just executing configs, loading (or not loading) maps or plugins, and executing commands.

I realize most coders are already busy working on other projects, but this should really be worth it, what I'm gonna do myself;

The first person to post here, or send to me over PM, a working version of my request, will (if they have PayPal), receive 20 dollars. Thank you.
(will be able to send as of next wednesday or so)
This is regardless of what is tested first, or when. (have my word on this, I NEED this plugin - otherwise my daily payment of two servers will be made obsolete)

NOTE: Please don't flame me or anything, I'm not trying to bribe anyone, just reward the effort. I desperately need this plugin.
This is not a scam or anything else like that crap, small personal thing between me and the author/poster that happens to be posted here.
__________________
Mod:
User:

Last edited by BlackMilk; 07-18-2007 at 09:58.
BlackMilk is offline
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 07-20-2007 , 09:31   Re: Advanced Day/Time Configs
Reply With Quote #2

Every part of that can be done with this plugin:
http://forums.alliedmods.net/showthread.php?t=1263

Example:

server.cfg:
amx_task "13:00" "exec 1300.cfg" t
mapchangecfgfile "server.cfg"

1300.cfg:
hostname "Somerandomclan Pub 1 Monday plugin1name"
amxx pause plugin1
amxx unpause plugin2
cvar1 "value2"
cvar2 "value1"
mapcyclefile "maps-1300.txt"


EDIT: Err, forgot day. The plugin above can be modified easily to allow daily, doing it.

EDIT: Try this, not tested. If day is not specified, it won't care what day it is.
amx_task "13:00" "exec 1300Mon.cfg" t Mon

Code:
/* AMX Mod script. (Nov 10th, 2002) * * Task Scheduler 0.2 *  by JustinHoMi * * amx_task time "task" flags * flags: *  m - time is in minutes *  s - time is in seconds *  r - repeat task *  t - specific time * */ #include <amxmodx> new task_cmds[32][108] new task_times[32][16] new numtasks = 0 public load_task() {     if (read_argc() < 5) {         server_print("[AMX] Usage:  amx_task < time > ^"command^" < flags > < day >")         return PLUGIN_HANDLED     }     new args[128]     read_args(args,128)     new clock[6], cmd[108], flags[5], day[4]     parse(args,clock,6,cmd,108,flags,5,day,3)         if( strlen(day) )     {         new curDay[4]         get_time("%a",curDay,3);         if( !equali(curDay, day, 0) )         {             return PLUGIN_HANDLED         }     }         new Float:time_f = floatstr(clock)     new flag[2] = ""     if (contain(flags,"r") != -1)         flag="b"     if (contain(flags,"m") != -1)         time_f = time_f * 60     if (contain(flags,"t") != -1)     {         copy(task_cmds[numtasks],108,cmd)         copy(task_times[numtasks],6,clock)         numtasks++         return PLUGIN_HANDLED     }     set_task(time_f,"run_task",0,cmd,108,flag)     return PLUGIN_CONTINUE } public run_task(cmd[]) {     server_cmd(cmd)     return PLUGIN_HANDLED } public check_time() {     new curtime[16]     get_time("%H:%M",curtime,16)     for(new i=0; i<numtasks; i++)         if(equal(curtime,task_times[i]))             server_cmd(task_cmds[i])     return PLUGIN_CONTINUE } public plugin_init() {     register_plugin("Task Scheduler","0.2","JustinHoMi")     register_srvcmd("amx_task","load_task")     set_task(60.0,"check_time",1,"",0,"b")     return PLUGIN_CONTINUE }
__________________

Last edited by FatalisDK; 07-20-2007 at 09:58.
FatalisDK is offline
BlackMilk
Veteran Member
Join Date: Jun 2007
Old 07-20-2007 , 11:33   Re: Advanced Day/Time Configs
Reply With Quote #3

EDIT: Blablabla, testing the above posted by Fatalis and otherwise I'll try my own way around the problem, thx FatalisDK.

(rest of post removed as by now I don't really need this "request" anymore)
__________________
Mod:
User:

Last edited by BlackMilk; 08-08-2007 at 05:13.
BlackMilk is offline
Rirre
Veteran Member
Join Date: Nov 2006
Old 02-08-2008 , 18:21   Re: Advanced Day/Time Configs
Reply With Quote #4

could someone fix this one?
It work's, but when the game server change map or crash so do it not execute the file longer.
Want the game server to execute the file until next day.
Rirre 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 21:48.


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