28.11.2009, 20:10
hey all im doing a mta converter for vehicles and now i dont know how to the converter put the two colors of the car i have this
the color in mta is this
so i want when i do the convert it gives to me the first and the second color but now only gives to me the first color its 0
pawn Код:
l = strfind(read, "color");
l+=6;
a=0;
lines = 0;
for(new o=l; o<256; o++)
{
if(read[o] == '"')
{
a++;
if(a == 2) break;
}
else
{
if(!lines)
{
format(strr,sizeof(strr),"%c",read[o]);
lines = 1;
}
else format(strr,sizeof(strr),"%s%c",strr,read[o]);
}
}
c = strval(strr);
l = strfind(read, "color");
l+=6;
a=0;
lines = 0;
for(new o=l; o<256; o++)
{
if(read[o] == '"' && read[o] == ' ')
{
a++;
if(a == 2) break;
}
else
{
if(!lines)
{
format(strr,sizeof(strr),"%c",read[o]);
lines = 1;
}
else format(strr,sizeof(strr),"%s%c",strr,read[o]);
}
}
v = strval(strr);
Код:
color="0,1,0,0"