Integrations & Exports
Client exports
Call these from another resource’s client-side Lua. Use the resource name bablo-freecam and start it before the calling resource.
| Export | Behavior |
|---|---|
OpenFreecam() | Opens the camera if inactive, checking permission when admin-only mode is enabled |
CloseFreecam() | Closes the camera if active |
ToggleFreecam() | Switches between open and closed, checking permission when opening |
IsFreecamActive() | Returns a boolean for the local player’s camera state |
exports['bablo-freecam']:OpenFreecam()exports['bablo-freecam']:CloseFreecam()exports['bablo-freecam']:ToggleFreecam()local active = exports['bablo-freecam']:IsFreecamActive()Opening can involve an asynchronous server permission check. OpenFreecam() and ToggleFreecam() do not return a success boolean; do not assume the camera is active immediately after calling them.
For a menu action that may run while Freecam is stopped:
if GetResourceState('bablo-freecam') == 'started' then
exports['bablo-freecam']:OpenFreecam()
endFramework detection
shared/bridge.lua selects QBCore, Qbox, ESX, or Standalone from started resources. Start your framework before Freecam and check the detection message in the console. The included Qbox integration uses the QBCore compatibility export.
The active bridge is selected separately from Settings.Framework; changing that settings field alone does not force the bridge selection.
HUD integration
The bundled HUD bridges are selected in this order:
bablo-hud-v2orbablo-hudps-hudqb-hudesx_hud- Standalone fallback for the GTA HUD and radar
Start the HUD before Freecam. HUD integrations live in client/bridge/hud/ and define Bridge.Client.HideHud() and Bridge.Client.ShowHud(). If your HUD uses different events or exports, adapt its bridge to the version you run.
Only the selected HUD bridge is used. Other custom overlays need their own hide/show integration.
Inventory & input conflicts
Freecam sets LocalPlayer.state.inv_busy and LocalPlayer.state.invBusy while active and clears them on exit. Inventory resources that check those flags can block opening during camera use. Resources with independent key mappings may need an additional guard.
For example, in another resource’s client-side key handler:
if GetResourceState('bablo-freecam') == 'started'
and exports['bablo-freecam']:IsFreecamActive() then
return
end
-- Continue with this resource's normal key action.Freecam suppresses the pause menu during camera use and briefly after exit. Studio captures Esc to return to the camera controls.

