I understand how to make a button that will call these commands, but what I'd like to do is also make the button an indicator. Sort of like, if you press the /role button, it puts you in Roleplayer mode, and the button stays pushed down until you click it again, in which case role is disabled, and you can see at a glance what mode you're in.
A couple things I'd like to do, but I doubt is possible:
1) Have the buttons "know" each other. That way if anon is pressed in while role is already pressed in, role pops out and anon pushes in. Or afk pops out...another way would be to say if you press a different player mode and previously toggled mode turns off. (Man I suck at explaining things...)
2) I looked, but couldn't find a data set that stores the player's mode. What I think would be a problem is the "Two light switches for one light" problem*. Essentially, if the role button is "off" and someone types /role, I'd like the button to press itself in. Kinda like a status light. And again, it's for "at a glance" info.
I think #1 is possible with some wonky scripting, but I'm not holding my breath for #2. Any ideas or help would be mucho appreciated!!
--
*Like a binary logic gate. When you have a hallway light that has a switch on both ends. If both are in the Off (down) position, and you turn #1 on (up), you reverse the role of switch #2. Now if you put switch #2 up instead of turning the light on, it does the opposite. I hated this alot growing up because one switch was almost always backwards