foreach(new vehicleid : Vehicles) { new topspeed = 100; if(GetVehicleVelocity(vehicleid) > topspeed) { SetVehicleVelocity(vehicleid) = topspeed; } }