This is more of a plugin request so it should be moved there, but this should work
It automatically deletes files that are older than a week. If you want to increment the time change this line. It's in weeks
Code:
#define WEEKS_TO_DELETE 1
As usual, SourceMod 1.7+
Spoiler
PHP Code:
#include <sourcemod> #include <sdktools>
#pragma semicolon 1 #pragma newdecls required
#define WEEKS_TO_DELETE 1
ArrayList filesToDelete;
public Plugin myinfo = { name = "[ANY] Sourcemod Log Deleter", author = "Headline, SWAT_88", description = "Deletes logs when they reach a certain age", version = "1.0.1", url = "colosseum-gaming.com" }
public void OnMapStart() { char path[PLATFORM_MAX_PATH], sTempString[128]; int count;