Local mute

I’m trying to make a command where people can locally mute other players with the SetMuted function. http://wiki.garrysmod.com/page/Player/SetMuted
I don’t know how I can do this by using OnPlayerChat https://wiki.garrysmod.com/page/GM/OnPlayerChat because there is only the one text string. I was thinking about using io.read, but it appears to only be available in regular lua, not glua. If anyone could help me out with this that would be great.



function mute( player, command, arguments )
	Player:SetMuted( boolean mute )
end
concommand.Add( "plymute", mute )


That should be what you’re looking for. But I just threw that together. It is untested. Message me if it dosent work, and i’ll go back and fix it. Also you need to place that as a .lua file in garrysmod\lua\autorun\server