Okay.
Zeig mir mal die Zeile format(agc, sizeof agc, ...
und die Funktion GetPoint.
format(agc, sizeof agc, "Dieses Fahrzeug steht zum Verkauf.\nName: %s\nPreis: %s", Kaufliste[typ][Name], GetPoint(Kaufliste[typ][Preis]));
stock GetPoint(Betrag)
{
new string[20],string2[50];
format(string, sizeof(string), "%d", Betrag);
if(strlen(string) <= 3){format(string2, sizeof(string2), "%s", string);}
else if(strlen(string) == 4)
{
new anstring[2],
zwstring[4];
format(anstring, sizeof(anstring), "%s", string);
format(zwstring, sizeof(zwstring), "%s", string[1]);
format(string2, sizeof(string2), "%s.%s", anstring,zwstring);
}
else if(strlen(string) == 5)
{
new anstring[3],
zwstring[4];
format(anstring, sizeof(anstring), "%s", string);
format(zwstring, sizeof(zwstring), "%s", string[2]);
format(string2, sizeof(string2), "%s.%s", anstring,zwstring);
}
else if(strlen(string) == 6)
{
new anstring[4],
zwstring[5];
format(anstring, sizeof(anstring), "%s", string);
format(zwstring, sizeof(zwstring), "%s", string[3]);
format(string2, sizeof(string2), "%s.%s", anstring,zwstring);
}
else if(strlen(string) == 7)
{
new anstring[2],
zwstring[4],
enstring[4];
format(anstring, sizeof(anstring), "%s", string);
format(zwstring, sizeof(zwstring), "%s", string[1]);
format(enstring, sizeof(enstring), "%s", string[4]);
format(string2, sizeof(string2), "%s.%s.%s", anstring,zwstring,enstring);
}
else if(strlen(string) == 8)
{
new anstring[3],
zwstring[4],
enstring[4];
format(anstring, sizeof(anstring), "%s", string);
format(zwstring, sizeof(zwstring), "%s", string[2]);
format(enstring, sizeof(enstring), "%s", string[5]);
format(string2, sizeof(string2), "%s.%s.%s", anstring,zwstring,enstring);
}
else if(strlen(string) == 9)
{
new anstring[4],
zwstring[4],
enstring[4];
format(anstring, sizeof(anstring), "%s", string);
format(zwstring, sizeof(zwstring), "%s", string[3]);
format(enstring, sizeof(enstring), "%s", string[6]);
format(string2, sizeof(string2), "%s.%s.%s", anstring,zwstring,enstring);
}
else if(strlen(string) == 10)
{
new anstring[2],
zwstring1[4],
zwstring2[4],
enstring[4];
format(anstring, sizeof(anstring), "%s", string);
format(zwstring1, sizeof(zwstring1), "%s", string[1]);
format(zwstring2, sizeof(zwstring2), "%s", string[4]);
format(enstring, sizeof(enstring), "%s", string[7]);
format(string2, sizeof(string2), "%s.%s.%s.%s", anstring,zwstring1,zwstring2,enstring);
}
else {format(string2, sizeof(string2), "%s", string);}
return string2;
}