Quote:
Originally Posted by xXDeathreusXx
Besides changing the version number, I don't see any change whatsoever
|
v1.3.0:
Code:
stock Handle:FindPlugin(String: pluginName[])
{
new String: buffer[256];
new String: path[PLATFORM_MAX_PATH];
new Handle: iter = GetPluginIterator();
new Handle: pl = INVALID_HANDLE;
while (MorePlugins(iter))
{
pl = ReadPlugin(iter);
Format(path, sizeof(path), "freaks/%s.ff2", pluginName);
GetPluginFilename(pl, buffer, sizeof(buffer));
if (!StrContains(buffer, path, false))
break;
else
pl = INVALID_HANDLE;
}
CloseHandle(iter);
return pl;
}
v1.3.1: Attempt 1
Code:
stock Handle:FindPlugin(String: pluginName[])
{
new String: buffer[256];
new String: path[PLATFORM_MAX_PATH];
new Handle: iter = GetPluginIterator();
new Handle: pl = INVALID_HANDLE;
while (MorePlugins(iter))
{
pl = ReadPlugin(iter);
Format(path, sizeof(path), "%s.ff2", pluginName);
GetPluginFilename(pl, buffer, sizeof(buffer));
if (!StrContains(buffer, path, false))
break;
else
pl = INVALID_HANDLE;
}
CloseHandle(iter);
return pl;
}
v1.3.2: Actually fixed (because i realized i was passing another .ff2 *cough* new Handle:plugin = FindPlugin("ff2_sarysapub3.ff2"); *cough*)
Code:
stock Handle:FindPlugin(String: pluginName[])
{
new String: buffer[256];
new String: path[PLATFORM_MAX_PATH];
new Handle: iter = GetPluginIterator();
new Handle: pl = INVALID_HANDLE;
while (MorePlugins(iter))
{
pl = ReadPlugin(iter);
Format(path, sizeof(path), "%s.ff2", pluginName);
GetPluginFilename(pl, buffer, sizeof(buffer));
if (StrContains(buffer, path, false) >= 0)
break;
else
pl = INVALID_HANDLE;
}
CloseHandle(iter);
return pl;
}
stock AMS_InitSubability(bossIdx, clientIdx, const String: pluginName[], const String: abilityName[], const String: prefix[])
{
new Handle:plugin = FindPlugin("ff2_sarysapub3");
if (plugin != INVALID_HANDLE)
{
new Function:func = GetFunctionByName(plugin, "AMS_InitSubability");
if (func != INVALID_FUNCTION)
{
Call_StartFunction(plugin, func);
Call_PushCell(bossIdx);
Call_PushCell(clientIdx);
Call_PushString(pluginName);
Call_PushString(abilityName);
Call_PushString(prefix);
Call_Finish();
}
else
LogError("ERROR: Unable to initialize ff2_sarysapub3:AMS_InitSubability()");
}
else
LogError("ERROR: Unable to initialize ff2_sarysapub3:AMS_InitSubability(). Make sure this plugin exists!");
}
__________________