Plies nearly got sprayed with a real shotgun on his music video set -- but lucky for him, a 911 operator convinced an armed passerby to let cops handle what he wrongly thought was a hostage situation.
We got the 911 call made by the guy who mistook Plies' rap music video shoot for an armed standoff between a "white boy" and a bunch of black guys "with dreadlocks" and guns.
You gotta hear the terrified caller yelling, "They gonna shoot this white boy!" ... right before offering to intervene with his own loaded shotgun!
As we reported ... cops quickly responded and discovered the guns weren't loaded, and the drama was all scripted.