SA-MP Forums Archive
Race Load - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Race Load (/showthread.php?tid=116703)



Race Load - Headshot1108 - 29.12.2009

hi i have a problem,
i have a script and it loads random race from a file.
but it doesnt work. in the server window it doesnt show "Race: Testrace", it show: "Race:"
for test, i wrote "race.txt" in scriptfiles, but doesnt work too.

Please help..

pawn Код:
forward RaceLoad();
public RaceLoad()
{
    new var[32];
    new File: file = fopen("race.txt", io_read);
    if(file)
    {
    format(var, 32, "%f", RaceInfo[rCP1][0]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP1][1]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP1][2]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP2][0]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP2][1]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP2][2]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP3][0]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP3][1]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP3][2]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP4][0]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP4][1]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP4][2]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP5][0]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP5][1]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP5][2]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP6][0]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP6][1]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP6][2]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP7][0]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP7][1]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP7][2]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP8][0]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP8][1]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP8][2]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP9][0]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP9][1]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP9][2]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP10][0]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP10][1]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP10][2]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP11][0]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP11][1]);fread(file, var);
    format(var, 32, "%f", RaceInfo[rCP11][2]);fread(file, var);
    format(var, 32, "%s", RaceInfo[rRekordName]);fread(file, var);
    format(var, 32, "%s", RaceInfo[rName]);fread(file, var);
    format(var, 32, "%d", RaceInfo[rBestms]);fread(file, var);
    fclose(file);
    }

    printf("Race: %s",RaceInfo[rName]);
    return 1;
}



Re: Race Load - Headshot1108 - 29.12.2009

help its very important


Re: Race Load - Headshot1108 - 30.12.2009

heeeeeeeeelp


Re: Race Load - Headshot1108 - 30.12.2009

please help!! its very important -.-