I have a deck and want to make a gate. I would like to know about the post do I screw it on to the deck or get those metal brackets for the post? I will use a 4x4 post. Has anyone use those paints that is only for decks/ If so how does it compare to stain (putting it on,lasting etc) thanks

Neal is correct about bolting the 4x4 post to the deck framing. You'll need to cut a hole through the deck flooring in line with the inside of the framing.
Actually, I offset the post by 3/4" so that it overlaps the framing by the 3/4" and I notch the bottom of the post accordingly. The post has to extend down the full width of the framing member (8" or 10") and then you can bolt through the frame and post in both directions. Also use construction adhesive on all mating surfaces.
Failure to do this and use only one of those surface mounted brackets will result in a wobbly gate. I'm currently re-doing an entire deck railing system because the previous 'contractor' didn't take the time to attach the posts to the framing. (ugh)