That is from RTB, you probably won't need the part for getting the title of the addon and rtb id and stuff so I removed it
%filepath = findFirstFile("Add-Ons/*_*/server.cs");
while(strlen(%filepath) > 0)
{
%zip = getSubStr(%filepath,8,strLen(%filepath)-strLen("/server.cs")-strLen("Add-Ons/"));
if($AddOn__[%zip] $= 1)
{
//do stuf
}
%filepath = findNextFile("Add-Ons/*_*/server.cs");
}