Hallo,
meine Frage ist folgende:
Ich habe einen String definiert(HouseInfo[HouseNr][InfoText]), indem kommt beispielsweise \n vor.
Jedoch wird das bei Create3DTextLabel nicht übernommen.
format(strg, sizeof(strg), "{FFFF00}Information:\n{FFFFFF}%s",HouseInfo[HouseNr][InfoText]);
Create3DTextLabel(strg,COLOR_LIGHTBLUE,HouseXCoords, HouseYCoords, HouseZCoords+0.5,10.0,0);
Gruß
Atrox
Edit: Y_Less hat mir geholfen
#include <a_samp>
ReColour(text[])
{
new
pos = -1;
while ((pos = strfind(text, "(", false, pos + 1)) != -1)
{
new
c = pos + 1,
n = 0,
ch;
// Note that the order of these is important!
while ((ch = text[code=c]) && n != 6)
{
if (!('a' <= ch <= 'f' || 'A' <= ch <= 'F' || '0' <= ch <= '9'))
{
break;
}
++c;
++n;
}
if (n == 6 && ch == ')')
{
text[pos] = '{';
text[code=c] = '}';
}
}
}