list = {{0, 0, 1}, {1, 1, 1}, {2, 4, 1}, {3, 2, -1}, {4, 1, -1}, {5, 4, 1}}; 1. You can Partition the input list to create separate lines and use the option PlotStyle to color pieces individually:
ListLinePlot[Partition[list[[All, ;; 2]], 2, 1], PlotStyle -> (Rest[list[[All, -1]]] /. {1 -> Green, -1 -> Blue}) ] 2. You can use the options Mesh and MeshShading as follows:
ListLinePlot[list[[All,split {1,= 2}]]SplitBy[list, Last]; Meshmesh ->= {Flatten@Position[Unitize[Differences[list[[Allsplit[[All, -1]]]]1, 1]1]]; meshshading -=split[[All, 1}, -1]] MeshShading/. {1 -> RotateRight[{Green, -1 -> Blue}; ListLinePlot[list[[All, {1, 2}]], Mesh -> UnitStep[list[[1{mesh}, MeshShading -1]]]]]> meshshading] 
