762 {
763 switch (slot_name)
764 {
765 case "CarBattery":
766 case "TruckBattery":
769 {
770 if (EngineIsOn())
771 {
772 EngineStop();
773 }
774 }
775
777 {
779 {
781 }
782
784 }
785 break;
786 case "SparkPlug":
787 case "GlowPlug":
789 if (
GetGame().IsServer() && EngineIsOn())
790 {
791 EngineStop();
792 }
793 break;
794 case "CarRadiator":
797 {
799 }
800
802 {
803 if (m_DamageZoneMap.Contains("Radiator"))
804 {
805 SetHealth("Radiator", "Health", 0);
806 }
807 }
808 break;
809 }
810
812 {
814 }
815
818 }
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. Use instead of IsLightsOn().
void UpdateLights(int new_gear=-1)
void ToggleHeadlights()
Switches headlights on/off, including the illumination of the control panel and synchronizes this cha...
proto native CGame GetGame()