07.06.2009, 20:04
hi;
Right, then I will expose my script rather than tell you.
I'm french and speak very bad English.
at the top of my script
changed my yrace begins by opening the file. type I created without problem
MY FILE
my problem, I not play in my cat still shows race (model = 0)
Thank you for your help; sry for my bad english (****** translation ^ ^)
Right, then I will expose my script rather than tell you.
I'm french and speak very bad English.
at the top of my script
Код:
new model;
Код:
public LoadRace(tmp[])
{
new string[256];
new race_name[50];
format(race_name, sizeof(race_name), "%s.type", tmp);
new File:gfile = fopen(race_name, io_read);
fread(gfile, string), model = strval(string);
fclose(gfile);
if(model == 0)
{
format(ystring,128,"[INFO]: une course a pied se prйpare!");
return 1;
}
if(model == 1)
{
format(ystring,128,"[INFO]: une course de voiture se prйpare!");
return 1;
}
if(model == 2)
{
format(ystring,128,"[INFO]: une course de moto se prйpare!");
return 1;
}
//------------------------STOP MY CHANGE
SendClientMessageToAll(COLOR_YELLOW,ystring);
new templine[512];
format(CRaceName,sizeof(CRaceName), "%s",tmp);
format(race_name,sizeof(race_name), "%s.yr",tmp);
if(!fexist(race_name)) return -1; // File doesn't exist
CFile=race_name;
LCurrentCheckpoint=-1; RLenght=.............................................
.........
.........
.........
}
MY FILE
Код:
model=2
Thank you for your help; sry for my bad english (****** translation ^ ^)



but my problem is reading the file does not change variable: (