Halt in hostilities agreed at talks in Malaysia will come into effect at midnight following 5 days of clashes