I've made a plugin for my scoutzknivez server a while ago to reload the map every 30 minutes. It forces map reload even when there are no players connected. The only downside for you is that it works with timelimit. But you could set the timelimit to a high value.
Edit: I just noticed that the plugin probably only works on CSS. Sorry.
PHP Code:
#include <sourcemod>
#include <cstrike>
new Handle:g_VoteTimer = INVALID_HANDLE;
new Handle:g_VoteTimer2 = INVALID_HANDLE;
new Handle:handle_timer2 = INVALID_HANDLE;
public Plugin:myinfo =
{
name = "Map timelimit enforcer",
author = "i3D Nightshadow",
description = "",
version = "1.1",
url = "http://forum.i3d.net"
};
public OnConfigsExecuted()
{
SetupTimeleftTimer();
SetNextMap("scoutzknivez");
}
public OnMapTimeLeftChanged()
{
SetupTimeleftTimer();
}
SetupTimeleftTimer()
{
new time;
if (GetMapTimeLeft(time) && time > 0)
{
new startTime = 1;
new warningTime = 10;
if (time + startTime < 1)
{
PrintToChatAll("[SM] Reloading map immediately..");
}
else
{
if (g_VoteTimer != INVALID_HANDLE)
{
KillTimer(g_VoteTimer);
g_VoteTimer = INVALID_HANDLE;
}
g_VoteTimer = CreateTimer(float(time + startTime), Timer_StartMapVote, _, TIMER_FLAG_NO_MAPCHANGE);
if (g_VoteTimer2 != INVALID_HANDLE)
{
KillTimer(g_VoteTimer2);
g_VoteTimer2 = INVALID_HANDLE;
}
g_VoteTimer2 = CreateTimer(float(time - warningTime), Timer_InitiateWarning, _, TIMER_FLAG_NO_MAPCHANGE);
}
}
}
public Action:Timer_StartMapVote(Handle:timer)
{
g_VoteTimer = INVALID_HANDLE;
PrintToChatAll("[SM] Restarting map \"scoutzknivez\"..");
CS_TerminateRound(5.0, CSRoundEnd_Draw, false);
new maxPlayers = GetMaxClients();
for(new i = 1; i <= maxPlayers; i++)
{
if (IsClientInGame(i) && IsPlayerAlive(i))
{
SetEntProp(i, Prop_Data, "m_takedamage", 0, 1);
SetEntityMoveType(i, MOVETYPE_LADDER);
}
}
return Plugin_Handled;
}
public Action:Timer_InitiateWarning(Handle:timer)
{
g_VoteTimer2 = INVALID_HANDLE;
if(handle_timer2 != INVALID_HANDLE)
{
KillTimer(handle_timer2);
handle_timer2 = INVALID_HANDLE;
}
handle_timer2 = CreateTimer(1.0, Timer_Warning, INVALID_HANDLE, TIMER_REPEAT);
return Plugin_Handled;
}
public Action:Timer_Warning(Handle:timer) // Repeated timer
{
// Create a global variable visible only in the local scope (this function).
static numPrinted = 10;
PrintHintTextToAll("Warning! The map will reload in %i seconds!", numPrinted);
if (numPrinted <= 0) {
handle_timer2 = INVALID_HANDLE; // Clear Handle before timer end finally!
return Plugin_Stop;
}
numPrinted--;
return Plugin_Continue;
}
public OnMapEnd()
{
g_VoteTimer = INVALID_HANDLE;
g_VoteTimer2 = INVALID_HANDLE;
handle_timer2 = INVALID_HANDLE;
}