Exports & API

Exports & API

legends_focus is a client-side only resource and does not expose any exports or events for external use.

Overview

This resource operates entirely client-side and manages its own camera system internally. The focus feature is triggered directly by player input and does not require or provide integration points for other resources.

Internal Functions

While not exposed as exports, the resource uses the following internal functions:

Camera Management

FunctionDescription
CreateZoomCamera()Creates and activates the scripted camera for zooming
DestroyZoomCamera()Removes the camera and returns to normal view
UpdateCameraToFollowPlayer()Updates camera position/rotation to match player view
TransitionFov(targetFov, onComplete)Smoothly transitions FOV with optional callback

Technical Details

  • Camera Type: DEFAULT_SCRIPTED_CAMERA
  • Default FOV: Captured from gameplay camera on resource start (~70.0)
  • Transition Speed: 2.5 (internal constant)
  • Zoom Out Target: 95% of default FOV to prevent overshoot

Integration Notes

If you need to integrate focus functionality with other resources, consider:

  1. Disabling during specific activities: Check if legends_focus is running and communicate via a custom event
  2. Custom implementations: The camera logic can serve as a reference for building custom zoom systems

Future Exports

If you have specific integration needs, please submit a feature request on our Discord. Potential future exports could include:

  • isPlayerFocusing() - Check if player is currently using focus
  • setFocusEnabled(bool) - Enable/disable focus feature
  • triggerFocus() / releaseFocus() - Programmatic focus control

Need Help?

Join our Discord for support: discord.gg/lgnds (opens in a new tab)


Legends Store - Premium FiveM Scripts