Need help cycling through weapons with a single button

I know this is an old topic, but in case anyone new comes looking for an answer, I just came up with a fairly simple solution that not only allows you to switch between equipped weapons with one button but also skip empty slots, as well as cycle backwards.

https://imgur.com/a/4YCBGYW