26.01.2013, 14:20
If this doesn't work, the problem is in your saving/loading.
EDIT: Also, make sure this line is spelled correctly, and has the proper capital letters etc.
Make sure you have created the folder 'vehicles' in your scriptfiles directory.
Reason: You had %s instead of %d, i is not a string, it is an integer.
pawn Код:
for(new i = 0; i < MAX_VEHICLES; i++)
{
new file[40];
format(file, sizeof(file), "vehicles/%d.ini", i);
if(!fexist(file)) continue;
AddStaticVehicleEx(dini_Int(file,"Model"), dini_Float(file,"PosX"), dini_Float(file,"PosY"), dini_Float(file,"PosZ"), dini_Float(file,"Angle"), dini_Int(file,"Color1"), dini_Int(file,"Color2"), 0);
}
Make sure you have created the folder 'vehicles' in your scriptfiles directory.
Reason: You had %s instead of %d, i is not a string, it is an integer.