No problem, let me help you even more.
A working fala road color finder (does require you to log in + out once! ). Also finds normal road color if wanted.
SCAR Code:
function SumFindRoadColor(FalaColor: Boolean): Integer;
var
arRoadPoints: TPointArray;
GenericColor, a, b: Integer;
arRoughRoadColors, arRoadColors: array of Integer;
WeGotIt: Boolean;
ResultString: string;
begin
if(FalaColor)then
GenericColor := 6057843
else
GenericColor := 5921377;
if(FalaColor)then
ResultString := 'Fala';
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(10.0, 0.03);
FindColorsTolerance(arRoadPoints, GenericColor, MMX1, MMY1, MMX2, MMY2, 50);
ColorToleranceSpeed(1);
arRoughRoadColors := GetColors(arRoadPoints);
for a := 0 to GetArrayLength(arRoughRoadColors) - 1 do
begin
WeGotIt := False;
if(arRoughRoadColors[a] > 5000000)and(arRoughRoadColors[a] < 8000000)then
begin
for b := 0 to GetArrayLength(arRoadColors) - 1 do
begin
if(arRoadColors[b] = arRoughRoadColors[a])then
WeGotIt := True;
end;
if not(WeGotIt)then
begin
if(CountColor(arRoughRoadColors[a], MMX1, MMY1, MMX2, MMY2) > 200)then
begin
if(rs_OnMinimap(arRoadPoints[a].x, arRoadPoints[a].y))then
begin
//Writeln(IntToStr(arRoughRoadColors[a]));
SetArrayLength(arRoadColors, GetArrayLength(arRoadColors) + 1);
arRoadColors[GetArrayLength(arRoadColors) - 1] := arRoughRoadColors[a];
end;
end;
end;
end;
end;
if not(GetArrayLength(arRoadColors) = 1)then
begin
Writeln('Failed to find the road using SumFindRoadColor.');
Writeln('Trying default autocoloring.');
if(FalaColor)then
Result := FindFallyRoadColor
else
Result := FindRoadColor;
end else
Result := arRoadColors[0];
Writeln('RoadColor = '+IntToStr(Result));
if(Result = 0)then
begin
Writeln('Failed to find the road color.');
Writeln('Leaving it what it was.');
if(FalaColor)then
Result := FalaRoadColor
else
Result := RoadColor;
end;
end;