Conventions & Gotchas

The house style every Echo resource follows — and two pitfalls that will bite you if you don't know them.

Conventions

Gotchas

⚠️ Metatables are stripped across resources

exports.echo_core:GetPlayer(src) returns an OOP object. FiveM strips its metatable over the export boundary, so calling methods on it from another resource (:GetMoney(), :SetJob(), …) fails with a "nil value (method …)" error. Use the flat helpers instead — Echo.GetPlayerData, Echo.GetMoney, Echo.AddMoney, etc. — which return plain values.

⚠️ provide doesn't reroute exports

echo_ui declares provide 'ox_target' and echo_inventory declares provide 'ox_inventory'. That only makes GetResourceState('ox_target') report "started" — it does NOT make exports.ox_target:… route to echo_ui. Always call the real resource:

-- wrong (silently fails — no such export)
exports.ox_target:addBoxZone(...)
exports.ox_inventory:AddItem(...)

-- right
exports.echo_ui:AddBoxZone(...)
exports.echo_inventory:AddItem(...)