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

Daily Server Configs


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:          Approver:   Geesu (62)
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 04-14-2005 , 15:12   Daily Server Configs
Reply With Quote #1

Code:
/************************************* * Daily Config Management * * File provided as is, no warranties! * By: BigBaller * First Release: April 14th, 2005 * * This plugin allows you to set a config file for a different day on your server. * Soo on Sunday, you could have a different server setup then Monday and ect. * This was a redesign from a older plugin by JustinHoMi, which was later ported to AMX MOD X * by Burnzy. * * * File names *ARE* case sensitive. Soo you must have the first letter in each day as a capital letter!!! * Examples: *  Sun.cfg *  Mon.cfg *  Tue.cfg *  Wed.cfg *  Thu.cfg *  Fri.cfg *  Sat.cfg * * All these config files are placed in the amxmodx/configs/daily_cfgs/ directory. * * In the config files, just place the CVARs you want ran in that day. What is great about this plugin is * you are still able to use a custom map config for a specific map and not conflict! * Soo in the Sat.cfg (saturday config) if I had sv_alltalk 1 then if the map fy_iceworld came up and I have * fy_iceworld in my amxmodx/configs/maps/ with sv_alltalk 0. Then sv_alltalk will be set to 0. Thus this allows * you to have global CVARs while still being able to set certain CVARs on specific maps!!! * * Also, since plugins are checked every map change, this plugin makes sure your mapchangecfgfile is server.cfg OR the config * used for that day. Especially good for you lazy admins such as myself :D. * * Now I know this will work for Counter-Strike/Condition Zero, however I am unsure of DoD/NS and other mods. * * Change Log: *  v1.0, Initial Release *************************************/ #include <amxmodx> #include <amxmisc> public plugin_init(){     register_plugin("Daily Config Management", "1.0", "BigBaller")     new today[8], configPath[256]     new todayFile[] = {"Sun.cfg","Mon.cfg","Tue.cfg","Wed.cfg","Thu.cfg","Fri.cfg","Sat.cfg"}     new serverCfg[] = "server.cfg" // change server.cfg if you do not want to use server.cfg as your default server config file!     get_time("%a", today, 8)     get_configsdir(configPath, 255)     format(todayFile, 255, "%s/daily_cfgs/%s.cfg", configPath, today)         if (file_exists(todayFile)){         set_cvar_string("mapchangecfgfile", todayFile) // Set today's server config file.          // log_amx("The file %s was loaded because it was found.", todayFile) // For Debugging purposes!         return PLUGIN_CONTINUE     }         set_cvar_string("mapchangecfgfile", serverCfg) // If there is no config file for today, it makes sure you are using the server.cfg file!     // log_amx("The file we are looking for does not exsist therefore doing the intended effect. File loaded is %s", serverCfg) // For Debugging purposes!     return PLUGIN_CONTINUE }

And I know putting everything in the plugin_init() isnt exactly effecient, HOWEVER it works and it works like it was designed to work.

I dont think I will add much more to this but I think other admins might find this extremely useful. I plan on using it to allow matrix mod to run on my server on Friday's only
Attached Files
File Type: sma Get Plugin or Get Source (daily_config.sma - 2526 views - 2.7 KB)
BigBaller is offline
kILL-jOY
Member
Join Date: Jul 2005
Old 09-07-2005 , 12:43  
Reply With Quote #2

this will be good for my server because then some hero's won't always be on.
Everyone wants something different, nj.
__________________
**|$uperHero|** Free level 8 / 75+ Heroes / BuyXP at 68.191.146.3:27015 - CS 1.6


kILL-jOY is offline
CubicVirtuoso
Senior Member
Join Date: Sep 2004
Location: Canada
Old 09-07-2005 , 13:17  
Reply With Quote #3

Very Cool idea works out nicely too. Good Job. Woot Now I can make bikini Tuesdays..
__________________
Sig Under Construction.
CubicVirtuoso is offline
Send a message via ICQ to CubicVirtuoso Send a message via AIM to CubicVirtuoso Send a message via MSN to CubicVirtuoso Send a message via Yahoo to CubicVirtuoso
Toxicity
Guest
Old 09-10-2005 , 23:23  
Reply With Quote #4

Would it be possible to add daily maplist/cycle changes as well?
Meatwad
Senior Member
Join Date: Jul 2004
Location: New york, LI
Old 09-11-2005 , 17:07  
Reply With Quote #5

Very nice!

This is good for weekenders.
__________________
http://googlefoundfunniest.ytmnd.com/

If you like Aqua Teen Hunger Force, then paste this onto your forehead. (Laugh out loud.)

Admin Weapons II
Meatwad is offline
KCE
Senior Member
Join Date: Jan 2005
Location: Los Angeles, CA
Old 02-06-2006 , 20:28  
Reply With Quote #6

Think you could do a monthly config for every day of the month and add support to pause plugins too?
KCE is offline
Bonesmuggler
Member
Join Date: Sep 2005
Old 09-02-2006 , 22:02   Re: Daily Server Configs
Reply With Quote #7

Can this be done for a daily map cycle , or does that already exisist. It would be very useful to have a new map tryout night for my server.

Thanks
Bones
Bonesmuggler is offline
graycypher
New Member
Join Date: Oct 2005
Old 11-10-2006 , 14:46   Re: Daily Server Configs
Reply With Quote #8

Can't you just add the following to your day.cfg file:

motdfile "day_motd.txt"
mapcyclefile "day_mapcycle.txt"

Then just create a file for each day you want to run different mapcycles or MOTDs.
graycypher is offline
Bonesmuggler
Member
Join Date: Sep 2005
Old 02-23-2007 , 17:24   Re: Daily Server Configs
Reply With Quote #9

I got the modt file to load fine but the mapcycle file doesn't load not sure if I'm doing something wrong. Is there a better way to do this, have a different mapcycle for everyday?
Bonesmuggler is offline
NIGHT5ER
Junior Member
Join Date: Jun 2006
Location: 127.0.0.1
Old 03-17-2007 , 14:06   Re: Daily Server Configs
Reply With Quote #10

I tried to install the plugin so I could hav Sat & Mondays CAL Map Days then Scoutzknivez Tuesdays GunGame Wed. Hide_n_Seek Thrusday & surfin sundays but no1 can connect to the server. when i take it off it works fine. Also the server has a constant High Ping of 200 or more. Hope Some One Can Help
__________________

http://cticlan.clanservers.com
8.6.3.232:27015 CTI Pub Server

Last edited by NIGHT5ER; 03-18-2007 at 11:38. Reason: More Info
NIGHT5ER is offline
Send a message via MSN to NIGHT5ER
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 04:32.


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