816 {
817 switch (slot_name)
818 {
819 case "CarBattery":
820 case "TruckBattery":
823 {
824 if (EngineIsOn())
825 {
826 EngineStop();
827 }
828 }
829
831 {
833 {
835 }
836
838 }
839 break;
840 case "SparkPlug":
841 case "GlowPlug":
843 if (
g_Game.IsServer() && EngineIsOn())
844 {
845 EngineStop();
846 }
847 break;
848 case "CarRadiator":
851 {
853 }
854
856 {
857 if (m_DamageZoneMap.Contains("Radiator"))
858 {
859 SetHealth("Radiator", "Health", 0);
860 }
861 }
862 break;
863 }
864
866 {
868 }
869
872 }
CarFluid
Type of vehicle's fluid. (native, do not change or extend)
class GP5GasMask extends MaskBase ItemBase
void UpdateHeadlightState()
void UpdateBattery(ItemBase battery)
bool IsScriptedLightsOn()
Proper way to get if light is swiched on.
override void UpdateLights(int new_gear=-1)
void ToggleHeadlights()
Switches headlights on/off, including the illumination of the control panel and synchronizes this cha...