本文整理汇总了C++中CExtension::IsExternal方法的典型用法代码示例。如果您正苦于以下问题:C++ CExtension::IsExternal方法的具体用法?C++ CExtension::IsExternal怎么用?C++ CExtension::IsExternal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CExtension
的用法示例。
在下文中一共展示了CExtension::IsExternal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnRootConsoleCommand
//.........这里部分代码省略.........
}
iter++;
}
/* This should never happen */
if (!pExt)
{
rootmenu->ConsolePrint("[SM] No extension was found with id %d.", id);
return;
}
if (!pExt->IsLoaded())
{
rootmenu->ConsolePrint(" File: %s", pExt->GetFilename());
rootmenu->ConsolePrint(" Loaded: No (%s)", pExt->m_Error.c_str());
}
else
{
char error[255];
if (!pExt->IsRunning(error, sizeof(error)))
{
rootmenu->ConsolePrint(" File: %s", pExt->GetFilename());
rootmenu->ConsolePrint(" Loaded: Yes");
rootmenu->ConsolePrint(" Running: No (%s)", error);
}
else
{
IExtensionInterface *pAPI = pExt->GetAPI();
rootmenu->ConsolePrint(" File: %s", pExt->GetFilename());
rootmenu->ConsolePrint(" Loaded: Yes (version %s)", pAPI->GetExtensionVerString());
rootmenu->ConsolePrint(" Name: %s (%s)", pAPI->GetExtensionName(), pAPI->GetExtensionDescription());
rootmenu->ConsolePrint(" Author: %s (%s)", pAPI->GetExtensionAuthor(), pAPI->GetExtensionURL());
rootmenu->ConsolePrint(" Binary info: API version %d (compiled %s)", pAPI->GetExtensionVersion(), pAPI->GetExtensionDateString());
if (pExt->IsExternal())
{
rootmenu->ConsolePrint(" Method: Loaded by Metamod:Source, attached to SourceMod");
}
else if (pAPI->IsMetamodExtension())
{
rootmenu->ConsolePrint(" Method: Loaded by SourceMod, attached to Metamod:Source");
}
else
{
rootmenu->ConsolePrint(" Method: Loaded by SourceMod");
}
}
}
return;
}
else if (strcmp(cmd, "unload") == 0)
{
if (argcount < 4)
{
rootmenu->ConsolePrint("[SM] Usage: sm exts unload <#> [code]");
return;
}
const char *arg = smcore.Arg(command, 3);
unsigned int num = atoi(arg);
CExtension *pExt = FindByOrder(num);
if (!pExt)
{
rootmenu->ConsolePrint("[SM] Extension number %d was not found.", num);
return;
}