Skip to content

New stock to add to smlib #52

@eyal282

Description

@eyal282

stock Handle:FindPluginByName(const String:PluginName[], bool:Sensitivity=true, bool:Contains=false)
{
new Handle:iterator = GetPluginIterator();

new Handle:PluginID;

new String:curName[PLATFORM_MAX_PATH];

while(MorePlugins(iterator))
{
	PluginID = ReadPlugin(iterator)
	GetPluginInfo(PluginID, PlInfo_Name, curName, sizeof(curName));

	if(StrEqual(PluginName, curName, Sensitivity) || (Contains && StrContains(PluginName, curName, Sensitivity) != -1))
	{
		CloseHandle(iterator);
		return PluginID;
	}
}

CloseHandle(iterator);
return INVALID_HANDLE;

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions