

/ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private./target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs./lua run
smokinghot said:Yea i am also trying to figure out how the check works cause its a huge pain in the arse lol so yea that would be wonderful if someone knew how to take it out or go around it some how.
Hell while were at it lets defeat the auth code system cause thats no fun either =)
CAutoLock Lock(&gPluginCS);
DebugSpew("LoadMQ2Plugin(%s)",Filename);
CHAR FullFilename[MAX_STRING]={0};
sprintf(FullFilename,"%s\\%s.dll",gszINIPath,Filename);
if (!mq2mainstamp) {
mq2mainstamp = checkme((char*)GetModuleHandle("mq2main.dll"));
}
HMODULE hmod=LoadLibrary(FullFilename);
if (!hmod)
{
DebugSpew("LoadMQ2Plugin(%s) Failed",Filename);
return 0;
}
if (mq2mainstamp > checkme((char*)hmod)) {
DebugSpew("Please recompile %s %d %d", FullFilename, mq2mainstamp, checkme((char*)hmod));
FreeLibrary(hmod);
return 0;
}
PMQPLUGIN pPlugin=pPlugins;
while(pPlugin)
{
if (hmod==pPlugin->hModule)
{
DebugSpew("LoadMQ2Plugin(%s) already loaded",Filename);
// LoadLibrary count must match FreeLibrary count for unloading to work.
FreeLibrary(hmod);
return 2; // already loaded
}
pPlugin=pPlugin->pNext;
}
CAutoLock Lock(&gPluginCS);
DebugSpew("LoadMQ2Plugin(%s)",Filename);
CHAR FullFilename[MAX_STRING]={0};
sprintf(FullFilename,"%s\\%s.dll",gszINIPath,Filename);
HMODULE hmod=LoadLibrary(FullFilename);
if (!hmod)
{
DebugSpew("LoadMQ2Plugin(%s) Failed",Filename);
return 0;
}
PMQPLUGIN pPlugin=pPlugins;
while(pPlugin)
{
if (hmod==pPlugin->hModule)
{
DebugSpew("LoadMQ2Plugin(%s) already loaded",Filename);
// LoadLibrary count must match FreeLibrary count for unloading to work.
FreeLibrary(hmod);
return 2; // already loaded
}
pPlugin=pPlugin->pNext;
}
Tone said:He's outta town till next monday :P, but cronic already had this the first day they added it and he emails it around with his plugins if you purchase em from him.
DeadChanter said:Ok...
In MQ2PluginHandler.cpp change :
Rich (BB code):CAutoLock Lock(&gPluginCS); DebugSpew("LoadMQ2Plugin(%s)",Filename); CHAR FullFilename[MAX_STRING]={0}; sprintf(FullFilename,"%s\\%s.dll",gszINIPath,Filename); if (!mq2mainstamp) { mq2mainstamp = checkme((char*)GetModuleHandle("mq2main.dll")); } HMODULE hmod=LoadLibrary(FullFilename); if (!hmod) { DebugSpew("LoadMQ2Plugin(%s) Failed",Filename); return 0; } if (mq2mainstamp > checkme((char*)hmod)) { DebugSpew("Please recompile %s %d %d", FullFilename, mq2mainstamp, checkme((char*)hmod)); FreeLibrary(hmod); return 0; } PMQPLUGIN pPlugin=pPlugins; while(pPlugin) { if (hmod==pPlugin->hModule) { DebugSpew("LoadMQ2Plugin(%s) already loaded",Filename); // LoadLibrary count must match FreeLibrary count for unloading to work. FreeLibrary(hmod); return 2; // already loaded } pPlugin=pPlugin->pNext; }
to look like :
Rich (BB code):CAutoLock Lock(&gPluginCS); DebugSpew("LoadMQ2Plugin(%s)",Filename); CHAR FullFilename[MAX_STRING]={0}; sprintf(FullFilename,"%s\\%s.dll",gszINIPath,Filename); HMODULE hmod=LoadLibrary(FullFilename); if (!hmod) { DebugSpew("LoadMQ2Plugin(%s) Failed",Filename); return 0; } PMQPLUGIN pPlugin=pPlugins; while(pPlugin) { if (hmod==pPlugin->hModule) { DebugSpew("LoadMQ2Plugin(%s) already loaded",Filename); // LoadLibrary count must match FreeLibrary count for unloading to work. FreeLibrary(hmod); return 2; // already loaded } pPlugin=pPlugin->pNext; }