22.08.2016, 14:46
I have this problem where, is creating the territories from turfs.cfg but doesn't show them with the right color. Those are the codes and a picture so you can see
pawn Код:
for(new i = 0; i < sizeof(TurfInfo); i++)
{
GangZoneShowForPlayer(playerid, Turfs[i], TurfInfo[i][zColor]);
}
public SaveTurfs()
{
new idx;
new File: file2;
while (idx < sizeof(TurfInfo))
{
new coordsstring[128];
format(coordsstring, sizeof(coordsstring), "%s|%s|%f|%f|%f|%f|%f|%f\n",
TurfInfo[idx][zOwner],
TurfInfo[idx][zColor],
TurfInfo[idx][zMinX],
TurfInfo[idx][zMinY],
TurfInfo[idx][zMaxX],
TurfInfo[idx][zMaxY]);
if(idx == 0)
{
file2 = fopen("cfg/turfs.cfg", io_write);
}
else
{
file2 = fopen("cfg/turfs.cfg", io_append);
}
fwrite(file2, coordsstring);
idx++;
fclose(file2);
}
return 1;
}