1.1 --- a/plugins/nextmap.sp Wed Mar 18 19:20:40 2009 -0700
1.2 +++ b/plugins/nextmap.sp Wed Mar 18 22:10:39 2009 -0700
1.3 @@ -51,14 +51,26 @@
1.4 new g_MapListSerial = -1;
1.5
1.6 new g_CurrentMapStartTime;
1.7 -
1.8 +
1.9 +public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
1.10 +{
1.11 + decl String:game[128];
1.12 + GetGameFolderName(game, sizeof(game));
1.13 +
1.14 + if (StrEqual(game, "left4dead", false)
1.15 + || StrEqual(game, "dystopia", false)
1.16 + || StrEqual(game, "synergy", false))
1.17 + {
1.18 + strcopy(error, err_max, "Nextmap is incompatible with this game");
1.19 + return APLRes_SilentFailure;
1.20 + }
1.21 +
1.22 + return APLRes_Success;
1.23 +}
1.24 +
1.25 +
1.26 public OnPluginStart()
1.27 {
1.28 - decl String:desc[128];
1.29 - GetGameFolderName(desc, sizeof(desc));
1.30 -
1.31 - if (StrEqual(desc, "left4dead", false))
1.32 - return;
1.33
1.34 LoadTranslations("common.phrases");
1.35 LoadTranslations("nextmap.phrases");
1.36 @@ -81,12 +93,6 @@
1.37
1.38 public OnConfigsExecuted()
1.39 {
1.40 - decl String:desc[128];
1.41 - GetGameFolderName(desc, sizeof(desc));
1.42 -
1.43 - if (StrEqual(desc, "left4dead", false))
1.44 - return;
1.45 -
1.46 decl String:lastMap[64], String:currentMap[64];
1.47 GetNextMap(lastMap, sizeof(lastMap));
1.48 GetCurrentMap(currentMap, 64);