sourcemod/plugins/testsuite/findmap.sp
Ross Bemrose c8caf7c860 Update FindMap testsuite plugin.
Update GetMapDisplayNAme to use platform separator on CSGO
2015-11-06 02:38:59 -05:00

31 lines
812 B
SourcePawn

#include <sourcemod>
public void OnPluginStart()
{
RegServerCmd("test_findmap", test_findmap);
}
public Action test_findmap( int argc )
{
char mapName[PLATFORM_MAX_PATH];
GetCmdArg(1, mapName, sizeof(mapName));
char resultName[18];
switch (FindMap(mapName, mapName, sizeof(mapName)))
{
case FindMap_Found:
strcopy(resultName, sizeof(resultName), "Found");
case FindMap_NotFound:
strcopy(resultName, sizeof(resultName), "NotFound");
case FindMap_FuzzyMatch:
strcopy(resultName, sizeof(resultName), "FuzzyMatch");
case FindMap_NonCanonical:
strcopy(resultName, sizeof(resultName), "NonCanonical");
case FindMap_PossiblyAvailable:
strcopy(resultName, sizeof(resultName), "PossiblyAvailable");
}
PrintToServer("FindMap says %s - \"%s\"", resultName, mapName);
return Plugin_Handled;
}