Your browser does not support JavaScript or its disabled!
Please turn it on, or be aware that some features on this website will not work correctly.
Open PMs in new tab #24
Opens any new PMS in a new tab, (i like to be able to see the chat in console as well as i'm usually on default, so toggling that option stopped seeing them in the main tab.) I'm sure there's a shorter way of doing this.
743b | 15 lines.
  Script made by Lee (Discord: l33_) -
  If you want to support my work, feel free to donate at
  PS. Stop ripping off my work and selling it as your own.
local privateTabs = addSwitch("openPMTabs", "PM Tabs", function(widget) widget:setOn(not widget:isOn()) storage.OpenPrivateTabs = widget:isOn() end, parent)

onTalk(function(name, level, mode, text, channelId, pos)
    if mode == 4 and privateTabs:isOn() then
        local g_console = modules.game_console
        local privateTab = g_console.getTab(name)
        if privateTab == nil then
            privateTab = g_console.addTab(name, true)
            g_console.addPrivateText(g_console.applyMessagePrefixies(name, level, text), g_console.SpeakTypesSettings['private'], name, false, name)
            playSound("/sounds/Private Message.ogg")

01 May 2021