Raised This Month: $ Target: $400
 0% 

anyone willing to help test/try/make this work?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
azure
Member
Join Date: Mar 2004
Old 03-27-2004 , 19:16   anyone willing to help test/try/make this work?
Reply With Quote #1

I had been posting in suggestions/requests, but this forum seemed more appropriate.... If this is not the proper forum for this, I apologize.

Code:
#include <amxmodx> public load_mapcycle() {    new today_str[8], cmd[48]    get_time("%H",today_str,8)    new today = str_to_num(today_str)    if ((today >= 0) && (today < 9))       format(cmd,48,"mapcyclefile addons/amxx/configs/morning.txt",today)    else if ((today >= 9) && (today < 18))       format(cmd,48,"mapcyclefile addons/amxx/configs/day.txt",today)    else if (today >= 18)       format(cmd,48,"mapcyclefile addons/amxx/configs/evening.txt",today)    server_cmd(cmd)    return PLUGIN_HANDLED } public plugin_init() {    register_plugin("Rotating Mapcycle-JustinHoMi","0.2","devicenull")    load_mapcycle()    return PLUGIN_CONTINUE }


Would anyone be interested in testing this on their server? What it is supposed to do is change your mapcyle according to time of day. You make a mapcycle called "day.txt" which covers from 9am to 6pm, "evening.txt" which covers 6pm to 12am, and "morning.txt" which covers 12am to 9am.

This could be helpful in that you could have a lot of lesser played or custom maps in the cycle for primetime, but then have only more popular maps in the cycle during later hours, to keep everyone happy and keep the server populated. I feel that it is a very useful idea, and I would really like to see it work.

On my server, when I enable this plugin, the server gets stuck on dust2. Then if we change the map to something else, it gets stuck in a loop on that map. I would like to see if it works on other servers to find out if it is just something specific to our server.

Devicenull had been trying to work at it a little.

Thanks to anyone ahead of time.
__________________
nohasslecs.com
our CS:Source server : 66.150.107.6:27015
IRC on Gamesurge @ #NHCS
azure is offline
SniperBeamer
AMX Mod X Founder
Join Date: Jun 2003
Location: Good Old Europe
Old 03-28-2004 , 09:32  
Reply With Quote #2

the config files should be in custom dir
I don't know if this will fix your problems:
Code:
#include <amxmodx> load_mapcycle() {    new today_str[4]    get_time("%H",today_str,3)    new today = str_to_num(today_str)    new customdir[32]    get_customdir(customdir,31)    if ((today >= 0) && (today < 9))      server_cmd("mapcyclefile ^"%s/morning.txt^"",customdir)    else if ((today >= 9) && (today < 18))      server_cmd("mapcyclefile ^"%s/day.txt^"",customdir)    else if (today >= 18)      server_cmd("mapcyclefile ^"%s/evening.txt^"",customdir) } public plugin_init() {    register_plugin("Rotating Mapcycle-JustinHoMi","0.2","devicenull")    load_mapcycle() }
__________________
SniperBeamer is offline
azure
Member
Join Date: Mar 2004
Old 03-28-2004 , 15:56  
Reply With Quote #3

Just tried it. Got this error on compile attempt:



rotating_mapcycles.sma(9) : error 017: undefined symbol "get_customdir"
__________________
nohasslecs.com
our CS:Source server : 66.150.107.6:27015
IRC on Gamesurge @ #NHCS
azure is offline
azure
Member
Join Date: Mar 2004
Old 03-29-2004 , 20:37  
Reply With Quote #4

Are you guys gonna make me try to learn this stuff for myself?

Sniper, all I ask is that you tell me how to fix the error, and I won't bother you for awhile. Well at least a few days anyway

I will try to learn more about all this one of these days.
__________________
nohasslecs.com
our CS:Source server : 66.150.107.6:27015
IRC on Gamesurge @ #NHCS
azure is offline
BAILOPAN
Join Date: Jan 2004
Old 03-29-2004 , 20:43  
Reply With Quote #5

Try the latest includes from the CVS... get_customdir should be defined

oh and also: it may be that the map cycle is being set _before_ the actual map cycle is set. I would set a 6 second timer like this:

Code:
#include <amxmodx> public load_mapcycle() {    new today_str[8], cmd[48]    get_time("%H",today_str,8)    new today = str_to_num(today_str)    if ((today >= 0) && (today < 9))       format(cmd,48,"mapcyclefile addons/amxx/configs/morning.txt",today)    else if ((today >= 9) && (today < 18))       format(cmd,48,"mapcyclefile addons/amxx/configs/day.txt",today)    else if (today >= 18)       format(cmd,48,"mapcyclefile addons/amxx/configs/evening.txt",today)    server_cmd(cmd)    return PLUGIN_HANDLED } public plugin_init() {    register_plugin("Rotating Mapcycle-JustinHoMi","0.2","devicenull")    set_task(6.0, "load_mapcycle")    return PLUGIN_CONTINUE }
__________________
egg
BAILOPAN is offline
azure
Member
Join Date: Mar 2004
Old 03-30-2004 , 15:49  
Reply With Quote #6

I don't feel comfortable being optimistic but, I think it may be working. That 6 second timer may have done the trick. Good call

It took a couple map changes before the cycle kicked in, but I think its working. No looping map.

I will check server at 6pm to see if it changes to the evening cycle. I will post here if it works.
__________________
nohasslecs.com
our CS:Source server : 66.150.107.6:27015
IRC on Gamesurge @ #NHCS
azure is offline
azure
Member
Join Date: Mar 2004
Old 03-31-2004 , 06:00  
Reply With Quote #7

ah well I was wrong, its still not working right...

It changes to the mapcycle like it should, but then it just gets stuck on the first map in the cycle. It never goes to the rest of the list. I do a listmaps in the console and it shows the proper cycle, so I know the plugin is doing its thing.

I wonder if the plugin makes the server change to the new mapcycle on EVERY mapchange, thus explaining why it would always be on the first map in the cycle...

Ah well, if anyone ever figures out how to get this to work, I will be first in line to use it.
__________________
nohasslecs.com
our CS:Source server : 66.150.107.6:27015
IRC on Gamesurge @ #NHCS
azure is offline
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 03-31-2004 , 09:23  
Reply With Quote #8

I think it does get called EVERY map change, cuz as far as I know, public plugin_init() gets called on every new map change..
xeroblood is offline
Send a message via MSN to xeroblood
Airies
Junior Member
Join Date: Mar 2004
Location: London
Old 05-12-2004 , 01:30  
Reply With Quote #9

Im also running this plugin on the 0.9.8a amx mod but it wont work on amxxmod.
Ive tried everything i can think off and this is why im still running 0.9.8a on our server.
All the plugins i had tried worked for amxx but this 1 has forced me to revert back to the old.
__________________
195.20.109.148:27030 [UK]
Airies 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 08:10.


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