I want to synchronize this script with server so every player sees when vehicle component rotates
 
	 
 
	function headLightsOpen() 
	   local theVeh = getPedOccupiedVehicle(localPlayer) 
	   if (theVeh) then 
	       local rx, ry, rz = getVehicleComponentRotation(theVeh, "misc_a") 
	       setVehicleComponentRotation(theVeh, "misc_a", rx+5, ry, rz) 
	   end 
	end 
	--bindKey ( "Num_9", "down", headLightsOpen ) 
	addCommandHandler("lamp1", headLightsOpen)
 
	 
	function headLightsClose() 
	   local theVeh = getPedOccupiedVehicle(localPlayer) 
	   if (theVeh) then 
	       local rx, ry, rz = getVehicleComponentRotation(theVeh, "misc_a") 
	       setVehicleComponentRotation(theVeh, "misc_a", rx-5, ry, rz)        
	   end 
	end 
	--bindKey ( "Num_3", "down", headLightsClose ) 
	addCommandHandler("lamp2", headLightsClose)