25.11.2010, 15:37
Hey guys i finally got my dynamic vehicle system working, the only problem is the way the file is saved.
I want the way it saves is that it goes to file and makes lines for each car, example:
The way it saves now is
Here is my code for saving
I think i need to use format but can someone help out, thanks.
I want the way it saves is that it goes to file and makes lines for each car, example:
pawn Код:
Carmodel | Posx | Posy | Posz | Angle | Color1 | Color2
Carmodel | Posx | Posy | Posz | Angle | Color1 | Color2
Carmodel | Posx | Posy | Posz | Angle | Color1 | Color2
pawn Код:
Model=411
Location_X=1796.386718
Location_Y=-1920.190429
Location_Z=13.392473
Angle=90.000000
Color_1=3
Color_2=3
pawn Код:
format(file, sizeof(file), "NLRP/Vehicles/%d.ini", i);
dini_Create(file);
dini_IntSet(file,"Model",CarInfo[i][cModel]);
dini_FloatSet(file,"Location_X",CarInfo[i][cLocationx]);
dini_FloatSet(file,"Location_Y",CarInfo[i][cLocationy]);
dini_FloatSet(file,"Location_Z",CarInfo[i][cLocationz]);
dini_FloatSet(file,"Angle",CarInfo[i][cAngle]);
dini_IntSet(file,"Color_1",CarInfo[i][cColorTwo]);
dini_IntSet(file,"Color_2",CarInfo[i][cColorOne]);