I wonder if it's possible to make the TF2 extension an optional dependency and detect if TF2 is being used that way.
This might address the tf_beta issue as well.
The code would look something like this:
PHP Code:
#undef REQUIRE_EXTENSIONS
#tryinclude <tf2>
new bool:g_bIsTF2 = false;
public OnAllPluginsLoaded()
{
g_bIsTF2 = LibraryExists("tf2");
}
public OnLibraryAdded(const String:name[])
{
if (StrEqual(name, "updater"))
{
Updater_AddPlugin(UPDATE_URL);
}
else if (StrEqual(name, "tf2"))
{
g_bIsTF2 = true;
}
}
public OnLibraryRemoved(const String:name[])
{
if (StrEqual(name, "tf2"))
{
g_bIsTF2 = false;
}
}
and then you'd use if (g_bIsTF2) blocks everywhere you currently have #if defined TF2COLORS.
Note: I didn't test this, not even in PawnStudio, so there may be syntax errors in it.
__________________