Loading

Paste #palq5u0uf

  1.         local vehicleList = this.vehicleList();
  2.         local unitnumberList = AIList();
  3.         for (local vehicle = vehicleList.Begin(); !VehicleList.IsEnd(); vehicle = vehicleList.Next()) {
  4.             if (AIVehicle.IsValidVehicle(vehicle) && AIVehicle.GetVehicleType(vehicle) == AIVehicle.VT_ROAD) {
  5.                 local unitnumber = AIVehicle.GetUnitNumber(vehicle);
  6.                 if (!unitnumberList.HasItem(unitnumber) {
  7.                     unitnumberList.AddItem(unitnumber, vehicle);
  8.                 } else {
  9.                     local value = unitnumberList.GetValue(unitnumber);
  10.                     if (value != vehicle) {
  11.                         unitnumberList.SetValue(unitnumber, vehicle);
  12.                     }
  13.                 }
  14.             }
  15.         }

Comments