[help] for-loop is " stopping the script"
#4

Nothing to do with 0.3, my guess would be GetVehicleModel(v) returning 0 for vehicles that don't exist.

maybe change it to something like
pawn Код:
print("All Vehicles were Successfully Spawned!");
    new number;
    for (new v = 1; v < MAX_VEHICLES; v++)
    {
        if((VehicleInfo[number][modelid] = GetVehicleModel(v))) {
            VehicleInfo[number][ID] = v;
            strmid(VehicleInfo[number][modelname], VehicleName[VehicleInfo[number][modelid]-400], 0, cellmax, SIZE) // replace SIZE, compiler bug
            GetVehiclePos(number, VehicleInfo[number][Xaxis], VehicleInfo[number][Yaxis], VehicleInfo[number][Zaxis]);
            GetVehicleZAngle(number,VehicleInfo[number][Angle]);
            VehicleInfo[number][fuel] = maxfuel;
            printf("Vehicle ID: %d Data had been saved.", v);
            number++;
        }
    }
    print("Vehicle data for %i vehicles has been stored.", number);
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)