Device-to-Device (D2D) technology based proximity services (ProSe) has been recently proposed to support Vehicle-to-Everything (V2X) communication. In this paper, we propose a joint resource scheduling scheme that caters to both distributed and centralized resource scheduling for D2D-based V2X communication under different network load conditions. In the proposed scheme, Vehicle User Equipments (V-UEs) can operate in either the scheduled resource allocation mode (mode 3) or the autonomous resource selection mode (mode 4). We then further divide mode 3 into dedicated mode and reuse mode. Since safety-critical information is very important for V2X communication, we guarantee the Quality of Service (QoS) of V2X communication by considering both ProSe Per- Packet Priority (PPPP) and communication link quality of V2X messages. Our objective is to maximize the overall information value of all V-UEs by joint resource scheduling of different resource allocation modes under different network load conditions while satisfying the minimum signal to interference noise ratio (SINR) requirements of both Pedestrian User Equipments (P-UEs) and V-UEs. Finally, extensive simulation results are presented to evaluate the efficacy of the proposed scheme.