The man triggered a major police response when he waved a replica gun from the window of his car outside NSW Parliament.