Task Scheduler - by JustinHoMi
1 Attachment(s)
A task scheduler to perform server commands at a specified interval or a specific time. Based on Clanmod's "cm_task".
Usage: Put tasks in your amx.cfg (or could possibly work in server.cfg) in the format: amx_task time "command" flags Flags: m - time is in minutes s - time is in seconds r - repeat task t - specific time (0:00-23:59, assumes "r" flag) For example to restart the round every 5 minutes use: amx_task 5 "sv_restart 1" mr ------------------------------------------------------------- originally by JustinHoMi original amx thread: http://djeyl.net/forum/index.php?showtopic=4130&st=0 NOTE: chagned all the "time" variables to "clock" added: #include <amxmodx> thanks to Bailopan and Gizzard for their help. |
Is it just me or do some of JustinHoMi plugins should be incorpated into the AMXX project?
Good plugin, thanks for the port. |
hrrmm this is very interesting. Could I set this up to change the mapcycle possibly?
like have mapcycle 1 from 9 till 23 and then mapcycle2 from 23 til 9? I am gonna have to look into this. But, if anyone already knows the answer, please let me know :wink: btw.. I noticed you left #include <amxmod> the amxmodx team will want you to use #include <amxmodx> before the plugin can be approved. Man I hope there is a way to get this mapcycle thing hooked up. I have been trying to find a way to do this for a while now. |
very interesting :wink:
|
#include <amxmodx> please
|
Quote:
|
Quote:
Only problem was that I wanted to specify this once, but the amx config file was run every mapload. hmm how did I do this ... I did something like amx_task 18:00 "amx_tsay blue Evening mapcycle loaded" t amx_task 18:01 "mp_timelimit 20" t amx_task 18:02 "mapcyclefile evening.txt" t then around 0100 I switched back amx_task 01:00 "amx_tsay blue Standard mapcycle loaded" t amx_task 01:01 "mp_timelimit 25" t amx_task 01:02 "mapcyclefile mapcyclefile.txt" t hmm how did I do this ... I did something like amx_task 18:00 "amx_tsay blue Evening mapcycle loaded" t amx_task 18:01 "mp_timelimit 20" t amx_task 18:02 "mapcyclefile evening.txt" t then around 0100 I switched back amx_task 01:00 "amx_tsay blue Standard mapcycle loaded" t amx_task 01:01 "mp_timelimit 25" t amx_task 01:02 "mapcyclefile mapcyclefile.txt" t one nice thing about this plugin is delayed action, like shutdown alias shutdown "exec shutdown.cfg" --- file shutdown.cfg -- amx_tsay red Shutting down server in 10 seconds amx_task 10 "quit" s amx_task 7 "amx_tsay red Server shutting down, come back later." s -- then you just send "shutdown" to hlds via your favorite admin tool. This plugin has endless possibilities, thx for the port! |
Yea I have tried that. And the server just gets stuck in a loop on the first map in the new cycle. If you do a listmaps in the console, it shows the new mapcycle so I know it changed. But like I said, it just keeps running the first map over and over.
In fact, just typing in "mapcyclefile newcycle.txt" causes the same issue. Any idea why? |
hrmm... update.
It turns out that the server only gets stuck on the first map for about 3 mapcycles. Then after that it finally starts to go through the other maps. I need to test some other stuff I guess. I am going to get rid of the nextmap plugin. Maybe that had something to do with it? nothing is ever easy.... |
Quote:
|
All times are GMT -4. The time now is 09:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.