Optional QBX DrawText3D integration
This integration redirects compatible E-key prompts passed to qbx.drawText3d(params) while leaving unsupported text in its original 3D format.
ensure qbx_core
ensure jex_interactions
# Resources that use qbx.drawText3d start below this line.
ensure my_resource
Config.InterceptDrawText3D = true
Open qbx_core/modules/lib.lua, find function qbx.drawText3d(params) and insert this block immediately after the declaration. Keep the original function content below it as the fallback:
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
Restart the entire server after editing this module: restarting only qbx_core may leave other resources using the previously loaded one.