Gang zone save reload
#2

I don't understand, doesn't save TurfColor even though you want? For now I'll just refactor your code a little
pawn Код:
forward SaveTurfs();
public SaveTurfs()
{
    new idx;
    new File: file2 = fopen("Factions/Turfs.ini", io_write);
    if(!file2) return 0;

    while (idx < sizeof(turfs))
    {
        new coordsstring[512];
        format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%d|%d|%d|%d|||%d|%d|%d|%d|%d___________________\n",
            turfs[idx][turfID],
            turfs[idx][turfName],
            turfs[idx][cityName],
            turfs[idx][zMinX],
            turfs[idx][zMinY],
            turfs[idx][zMaxX],
            turfs[idx][zMaxY],
            turfs[idx][TurfColor],
            turfs[idx][TurfOwner],
            turfs[idx][TurfAttacker],
            turfs[idx][TurfKills],
            turfs[idx][TurfAttackKills],
            turfs[idx][TurfWarStarted],
            turfs[idx][MIT]);

        fwrite(file2, coordsstring);
        idx++;
    }
    fclose(file2);
    return 1;
}
Reply


Messages In This Thread
Gang zone save reload - by Cr3dO - 25.03.2015, 19:21
Re: Gang zone save reload - by Misiur - 25.03.2015, 19:56
Re: Gang zone save reload - by Cr3dO - 25.03.2015, 20:04
Re: Gang zone save reload - by Misiur - 25.03.2015, 20:28
Re: Gang zone save reload - by Cr3dO - 25.03.2015, 20:33

Forum Jump:


Users browsing this thread: 1 Guest(s)