The Las Vegas SWAT team responded to a neighborhood where the reality show "Repo Games" was being taped last night ... when someone pulled out a gun and opened fire near crew members.
It all went down around 9 PM at a home in North Las Vegas ... when the "Repo" team arrived to take possession of a car ... hoping to play a trivia game with the owner to give him a chance to win it back.
We're told someone in a home three doors down from the production witnessed the repo taking place ... and for some unknown reason, pulled out a gun and began shooting.
Cops and SWAT team members raced to the scene and surrounded the home -- and ultimately took the man into custody. Fortunately, no one was hit by the gunfire.
Law enforcement sources confirm ... cops found multiple firearms inside the suspect's home ... and the alleged gunman was taken to a nearby hospital for a mental evaluation. Officers believed he may have been suicidal.
Sources connected to the "Repo Games" production tell us ... producers believe the man was shooting at them -- so they closed down the shoot before they played any of the games ... and the repo team kept the car.