AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Task Scheduler - by JustinHoMi (https://forums.alliedmods.net/showthread.php?t=1263)

pendragon 04-20-2004 22:40

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.

BigBaller 04-21-2004 00:05

Is it just me or do some of JustinHoMi plugins should be incorpated into the AMXX project?

Good plugin, thanks for the port.

azure 04-21-2004 02:17

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.

[BioMaN]**neogun** 04-21-2004 06:15

very interesting :wink:

PM 04-21-2004 11:40

#include <amxmodx> please

pendragon 04-21-2004 14:10

Quote:

Originally Posted by PM
#include <amxmodx> please

done.. sorry bout that guys ... Still learning.

Stardust 04-24-2004 10:25

Quote:

Originally Posted by azure
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 did this with the amx mod an this plugin, worked fine.
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!

azure 04-26-2004 03:01

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?

azure 04-26-2004 04:41

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....

pendragon 04-26-2004 13:52

Quote:

Originally Posted by azure
nothing is ever easy....

you got that right - good luck in your testing.


All times are GMT -4. The time now is 05:36.

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