Is it possible to toggle your microphone key?

Posts 1–9 of 9 · Page 1 of 1
Is it possible to toggle your microphone key?
Been looking around for a while, closest I have come to a digital toggle is putting my phone on top of a stack of pennies on the key. I have looked for console commands, lua's, Windows macros, and a bunch of other stupid garbage. Still new to lua as well or else I would do it myself. Any comments are greatly appreciated.
+voicerecord, in console and when you wanna toggle it off -voicerecord
Just bind a key to +voicerecord and another to -voicerecord
That's probably the easiest way to do it.
Quote Originally Posted by Wasps View Post
Just bind a key to +voicerecord and another to -voicerecord
That's probably the easiest way to do it.
*facepalm* Your Default X key is +voicerecord The only way to toggle it is though console / scripts.
Welp, My bad, Been up working for a while kinda retarded right now.
He could use a macro, That's what I do.

EDIT: Use this if you want to, whipped it up (though you could probably find a script for this anywhere)
Code:
local shouldTalk = false
function stickyTalk()
	if shouldTalk then
		LocalPlayer():ConCommand("+voicerecord")
	else
		LocalPlayer():ConCommand("-voicerecord")
	end
end
hook.Add("Think", "stickyTalk", stickyTalk)

function toggleStickyTalk()
	shouldTalk = not shouldTalk
end
concommand.Add("voicerecord", toggleStickyTalk)
just bind a key to voicerecord and go nuts
Quote Originally Posted by Wasps View Post
Welp, My bad, Been up working for a while kinda retarded right now.
He could use a macro, That's what I do.

EDIT: Use this if you want to, whipped it up (though you could probably find a script for this anywhere)
Code:
local shouldTalk = false
function stickyTalk()
	if shouldTalk then
		LocalPlayer():ConCommand("+voicerecord")
	else
		LocalPlayer():ConCommand("-voicerecord")
	end
end
hook.Add("Think", "stickyTalk", stickyTalk)

function toggleStickyTalk()
	shouldTalk = not shouldTalk
end
concommand.Add("voicerecord", toggleStickyTalk)
just bind a key to voicerecord and go nuts

Now how would I use this? It's not in the format for a command, would I use it in a .lua, or is that a raw macro?

(Like I said, still new)

Thanks for the replies also.
Quote Originally Posted by Shlomiee View Post
Now how would I use this? It's not in the format for a command, would I use it in a .lua, or is that a raw macro?

(Like I said, still new)

Thanks for the replies also.
It's lua, read the stickies on how to run lua files on servers.
alias voiceon "+voicerecord; bind v voiceoff"
alias voiceoff "-voicerecord; bind v voiceon"
bind "v" "voiceon"
waiting for somebody to post that
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us