An allegedly drunk P-plater has lost his licence after crashing on tram tracks in the city.