omg, this will add new infinite-times timer every 200ms
this is better and wont kill the server:
funcion lights ()
for i,v in pairs (getElementsByType("vehicle") do
setVehicleHeadLightColor (v, math.random(0,255), math.random(0,255), math.random(0,255))
end
end
function startTimer()
setTimer ( lights, 200, 0 )
end
addEventHandler ("onResourceStart", root, startTimer)