18.01.2012, 01:26
Yeah I do.
pawn Код:
LoadVehicles();
pawn Код:
stock LoadVehicles()
{
new counter = 0;
for(new i = 0;i<SCRIPT_CARS;i++)
{
new file[64];format(file,sizeof file,VEHICLE_PATH,i);
if(fexist(file))
{
new INI:handler = INI_Open(file);
INI_ParseFile(file,"LoadVehicle",.bExtra = true, .extra = i);
VehicleInfo[i][vID] = CreateVehicle(VehicleInfo[i][vModel],VehicleInfo[i][vPosX],VehicleInfo[i][vPosY],VehicleInfo[i][vPosZ],VehicleInfo[i][vPosA],VehicleInfo[i][vColor1],VehicleInfo[i][vColor2], 5000);
SetVehicleNumberPlate(VehicleInfo[i][vID], VehicleInfo[i][vPlate]);
SetVehicleToRespawn(VehicleInfo[i][vID]);
INI_Close(handler);
counter++;
}
}
printf("%i vehicle(s) loaded.",counter);
}