Hallo liebe Breadfischler,
ich habe eine Problem ich habe das FractionCar System, was hier vor langer zeit mal im Forum releases wurde.
Undzwar lädt oder speichert er die Autos nicht, ich biite um Hilfe hier meien Codes:
public LoadFractionCars(){
if(!fexist(Fraction_Car_File)){
new File:tfFile=fopen(Fraction_Car_File,io_write);
fclose(tfFile);
}
new File:fFile=fopen(Fraction_Car_File,io_read),Content[512],fc;
while(fread(fFile,Content)){
StripNewLine(Content);
sscanf(Content,"dffffddddddd",FractionCars[fc][fVehid],FractionCars[fc][fPos][0],FractionCars[fc][fPos][1],FractionCars[fc][fPos][2],FractionCars[fc][fPos][3],FractionCars[fc][fCol][0],FractionCars[fc][fCol][1],FractionCars[fc][fFraction][0],FractionCars[fc][fFraction][1],FractionCars[fc][fFraction][2],FractionCars[fc][fFraction][3],FractionCars[fc][fFraction][4]);
if(FractionCars[fc][fVehid] >= 400 && FractionCars[fc][fVehid] <= 611)
{
FractionCars[fc][fCarid] = CreateVehicle(FractionCars[fc][fVehid],FractionCars[fc][fPos][0],FractionCars[fc][fPos][1],FractionCars[fc][fPos][2],FractionCars[fc][fPos][3],FractionCars[fc][fCol][0],FractionCars[fc][fCol][1],-255);
FractionCars[fc][fLock] = true;
fc++;
}
}
fclose(fFile);
return printf(" '%d' Fraktionsfahrzeug(e) wurden geladen & erstellt.",fc);
}
Hier Speicher:
public SaveFractionCars(){
if(fexist(Fraction_Car_File)) fremove(Fraction_Car_File);
new File:fFile=fopen(Fraction_Car_File,io_append),Content[512];
new fc;while(fc<MAX_FRACTION_CARS){
if(FractionCars[fc][fVehid] >= 400 && FractionCars[fc][fVehid] <= 611){
format(Content,sizeof(Content),"%d %.3f %.3f %.3f %.3f %03d %03d %02d %02d %02d %02d %02d\r\n",FractionCars[fc][fVehid],FractionCars[fc][fPos][0],FractionCars[fc][fPos][1],FractionCars[fc][fPos][2],FractionCars[fc][fPos][3],FractionCars[fc][fCol][0],FractionCars[fc][fCol][1],FractionCars[fc][fFraction][0],FractionCars[fc][fFraction][1],FractionCars[fc][fFraction][2],FractionCars[fc][fFraction][3],FractionCars[fc][fFraction][4]);
fwrite(fFile,Content);
}fc++;
}return fclose(fFile);
}
Ich habe es sogar schon in dem Gamemod eingefügt!