Quote:
Originally Posted by ffriozi
Hey mate i'm not an expert can you please upload the .SMX of this command please? thanks.
|
Ensuring that you have sv_hibernate_when_empty set to 0, this will work (thanks to ch4o5):
Code:
#include <sourcemod>
#define PLUGIN_VERSION "1.0.0"
public Plugin:myinfo =
{
name = "ckSurf fix",
author = "ch4os, edit by blackhawk74/sneaK",
description = "Reloads current map within 20 seconds after server restart",
version = PLUGIN_VERSION,
url = "www.killerspielplatz.com"
}
public OnPluginStart()
{
CreateTimer(20.0, Event_ReloadMap);
}
public Action:Event_ReloadMap(Handle:Timer)
{
decl String:MapName[255];
GetCurrentMap(MapName, 255);
ServerCommand("changelevel %s", MapName);
}
Originally it was set to 2 minutes after server restart, bu that is a long time so I made it 20 seconds (you can customize however you wish), also I removed the line printing to chat about server restarting map because clients do not see it anyways (map changes instantly after message was printed to chat)
He did post a fix for sv_hibernate_when_empty 1, but that doesn't work properly (you can see it on the open issue)
Edit: Attached it in a file for easy access