ID:264810
 
Code:
mob
gm
verb
toggle_mute(mob/m in world)
set category = "Staff"
set name = "Toggle Mute"
set desc = "Mute a player"
if(m.muted==1)
m.muted=0
world << output ("<b><font color=blue>[m.key] has been unmuted!</font>", "OOC")
return
else
m.muted=1
world << output ("<b><font color=yellow>[m.key] has been muted!</font>", "OOC")
return


Problem description: The code works perfectly, the only thing, is when muting, I'd like to be able to select players, instead of mobs. I've tried replacing all that with usr, but it says the variable is undefined.

Compile a list of clients, either each time you're executing the command (bad), or once on start up (keep it modified at client/New() and client/Del()), then select from that list (or respectively their mobs).
You are looking for /client then. A client is directly the player. The /mob is what a client controls.