3 wire solenoid

Hey guys,

I made the circuit as was shown here (via fritzing) but the resistors burn.

what Watt should I use? I used 0.5 watt (smd resistors) but I think I got too much current and burned them and the pnp.

thanks.