I am working on some code so I can listen to users and check for ghosting, or see if they are trying to bullshit their way out of stuff. Being able to listen to them speaking with their skype buddy helps a lot. The only thing not working, is the 'ulx.fancyLogAdmin' line.
function ulx.micon(calling_ply, target_ply)
target_ply:SendLua([[
timer.Create("mictoggle", 0.2, 0, function()
LocalPlayer():ConCommand("+voicerecord")
end)
]])
ulx.fancyLogAdmin( calling_ply, true, "#A Forced mic on, on #T", target_ply )
end
local micon = ulx.command("Chat", "ulx micon", ulx.micon, "!micon")
micon:addParam{ type=ULib.cmds.PlayerArg }
micon:defaultAccess( ULib.ACCESS_SUPERADMIN )
micon:help( "Force microphone on." )
function ulx.micoff(calling_ply, target_ply)
target_ply:SendLua([[
timer.Destroy("mictoggle")
LocalPlayer():ConCommand("-voicerecord")
]])
ulx.fancyLogAdmin( calling_ply, true, "#A Forced mic on, on #T", target_ply )
end
local micoff = ulx.command("Chat", "ulx micoff", ulx.micoff, "!micoff")
micoff:addParam{ type=ULib.cmds.PlayerArg }
micoff:defaultAccess( ULib.ACCESS_SUPERADMIN )
micoff:help( "Force microphone off." )
What am I missing?