Integración opcional con QBX DrawText3D

Esta integración redirige los avisos de tecla E compatibles que pasan por qbx.drawText3d(params) y deja en 3D el texto que no lo sea.

server.cfg

ensure qbx_core
ensure jex_interactions

# Los recursos que usen qbx.drawText3d van por debajo de esta linea.
ensure my_resource

jex_interactions/config.lua

Config.InterceptDrawText3D = true

Abre qbx_core/modules/lib.lua, busca function qbx.drawText3d(params) e inserta este bloque justo después de la declaración. Deja debajo el contenido original de la función como alternativa:

qbx_core/modules/lib.lua

local text = params.text

local mayBeInteraction = text and (
    text:find('[E]', 1, true)
    or text:find('E~', 1, true)
    or text:find('~E~', 1, true)
    or text:find(' E ', 1, true)
    or text:find('E -', 1, true)
)

if mayBeInteraction and GetResourceState('jex_interactions') == 'started' then
    local ok, taken = pcall(function()
        return exports.jex_interactions:consumeDrawText3D(text)
    end)
    if ok and taken then return end
end

Reinicia el servidor entero después de editar el módulo: reiniciar solo qbx_core deja al resto de recursos con la versión anterior cargada.