#include <sourcemod>
#include <sdktools>
public Plugin:myinfo =
{
name = "Radar and map screen downloader",
author = "Joshua 'Woopers' Stinkson",
description = "Adds the radar and map screen files to the downloads table",
version = "1.0",
url = "http://theonion.com/"
}
public OnMapStart()
{
decl String:mapName[128];
decl String:loadingScreen[128];
decl String:radarTexture[128];
decl String:radarConfig[128];
GetCurrentMap(mapName, sizeof(mapName));
Format(loadingScreen, sizeof(loadingScreen), "maps/%s.jpg", mapName);
Format(radarTexture, sizeof(radarTexture), "resource/overviews/%s_radar.dds", mapName);
Format(radarConfig, sizeof(radarConfig), "resource/overviews/%s.txt", mapName);
if(FileExists(loadingScreen))
{
AddFileToDownloadsTable(loadingScreen);
PrintToServer("Loading screen found: %s",loadingScreen);
}
if(FileExists(radarTexture))
{
AddFileToDownloadsTable(radarTexture);
PrintToServer("Radar found: %s",radarTexture);
}
if(FileExists(radarConfig))
{
AddFileToDownloadsTable(radarConfig);
PrintToServer("Radar definition file found: %s",radarConfig);
}
}