how can I draw lines on surfaces that in the z axis in perspective?
If the CPlane is World XY, you can use the elevator mode. Click LMB once for the line start point and Ctrl+LMB on the same point to lock the end point on a local Z-axis, then pull the mouse up or down.
or hit V followed by space/enter while in the command. the elevator mode has the advantage to be more global, its also handy for moving/copying objects along z, or anything else which involves the z axis.