26.07.2012, 12:29
Here it is.
pawn Код:
public LoadRace(tmp[])
{
new i;
format(raceName, sizeof(raceName), "%s.yr", tmp);
LCurrentCheckpoint = -1;
new File:raceFile = fopen(raceName, io_read);
fread(raceFile, tmp, 64);
i = 0;
while(fread(raceFile, tmp, 64, false))
{
LCurrentCheckpoint++;
i = 0;
RaceCheckpoints[LCurrentCheckpoint][0] = floatstr(strtok(tmp, i));
RaceCheckpoints[LCurrentCheckpoint][1] = floatstr(strtok(tmp, i));
RaceCheckpoints[LCurrentCheckpoint][2] = floatstr(strtok(tmp, i));
}
fclose(raceFile);
return 1;
}