> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nonefivem.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Client Exports

> Documentation for client-side exports.

## Camera State

### is\_camera\_active

Checks if the camera is currently active (holding, viewing, or photo mode).

```lua theme={null}
---@return boolean is_active
local is_active = exports["no-camera"]:is_camera_active()
```

### get\_camera\_state

Gets the current camera state.

```lua theme={null}
---@enum CAMERA_STATE
CAMERA_STATE = {
    DEACTIVE = 0,
    HOLDING = 1,
    VIEWING = 2,
    PHOTO_MODE = 3
}

---@return CAMERA_STATE state
local state = exports["no-camera"]:get_camera_state()
```

### is\_photo\_mode

Checks if the player is currently in photo mode (viewfinder active).

```lua theme={null}
---@return boolean is_photo_mode
local is_photo_mode = exports["no-camera"]:is_photo_mode()
```

### is\_viewing\_mode

Checks if the player is currently viewing the camera menu.

```lua theme={null}
---@return boolean is_viewing
local is_viewing = exports["no-camera"]:is_viewing_mode()
```

### is\_taking\_photo

Checks if a photo is currently being taken.

```lua theme={null}
---@return boolean is_taking_photo
local is_taking = exports["no-camera"]:is_taking_photo()
```

## Camera Control

### activate\_camera

Activates the camera (enters holding state).

```lua theme={null}
exports["no-camera"]:activate_camera()
```

### deactivate\_camera

Deactivates the camera completely.

```lua theme={null}
exports["no-camera"]:deactivate_camera()
```

### toggle\_camera

Toggles the camera on/off.

```lua theme={null}
---@return boolean is_active Returns true if camera is now active
local is_active = exports["no-camera"]:toggle_camera()
```

### enter\_photo\_mode

Enters photo mode (viewfinder).

```lua theme={null}
---@return boolean success
---@return string? error Error message if failed
local success, error = exports["no-camera"]:enter_photo_mode()
```

### exit\_photo\_mode

Exits photo mode (returns to holding state).

```lua theme={null}
exports["no-camera"]:exit_photo_mode()
```

### toggle\_photo\_mode

Toggles photo mode on/off.

```lua theme={null}
---@return boolean is_photo_mode
local is_photo_mode = exports["no-camera"]:toggle_photo_mode()
```

### enter\_viewing\_mode

Enters viewing mode (camera menu).

```lua theme={null}
exports["no-camera"]:enter_viewing_mode()
```

### exit\_viewing\_mode

Exits viewing mode (returns to holding state).

```lua theme={null}
exports["no-camera"]:exit_viewing_mode()
```

### toggle\_viewing\_mode

Toggles viewing mode on/off.

```lua theme={null}
exports["no-camera"]:toggle_viewing_mode()
```

### take\_photo

Takes a photo (must be in photo mode).

```lua theme={null}
---@return boolean success
---@return string? error Error message if failed
local success, error = exports["no-camera"]:take_photo()
```

## Camera Settings

### get\_camera\_settings

Gets all current camera settings.

```lua theme={null}
---@class CameraSettingsData
---@field iso number
---@field shutter_speed string
---@field aperture number
---@field zoom_level number
---@field flash_mode string

---@return CameraSettingsData settings
local settings = exports["no-camera"]:get_camera_settings()
```

### set\_iso

Sets the camera ISO value.

```lua theme={null}
---@param value number ISO value (100, 200, 400, 800, 1600, 3200, 6400)
---@return boolean success
local success = exports["no-camera"]:set_iso(400)
```

### set\_shutter\_speed

Sets the camera shutter speed.

```lua theme={null}
---@param value string Shutter speed ("1/4000", "1/2000", "1/1000", "1/500", "1/250", "1/125", "1/60", "1/30", "1/15", "1/8", "1/4", "1/2", "1")
---@return boolean success
local success = exports["no-camera"]:set_shutter_speed("1/250")
```

### set\_aperture

Sets the camera aperture.

```lua theme={null}
---@param value number Aperture value (1.4, 2, 2.8, 4, 5.6, 8, 11, 16, 22)
---@return boolean success
local success = exports["no-camera"]:set_aperture(2.8)
```

### set\_zoom

Sets the camera zoom level.

```lua theme={null}
---@param value number Zoom level (1, 1.5, 2, 3, 5, 10)
---@return boolean success
local success = exports["no-camera"]:set_zoom(2)
```

### set\_flash\_mode

Sets the camera flash mode.

```lua theme={null}
---@param value string Flash mode ("auto", "on", "off")
---@return boolean success
local success = exports["no-camera"]:set_flash_mode("auto")
```

### update\_camera\_settings

Updates multiple camera settings at once.

```lua theme={null}
---@param settings table Settings to update (iso, shutter_speed, aperture, zoom_level, flash_mode)
---@return table result { success = table, settings = table }
local result = exports["no-camera"]:update_camera_settings({
    iso = 800,
    aperture = 4,
    flash_mode = "on"
})
```

### reset\_camera\_settings

Resets all camera settings to defaults.

```lua theme={null}
exports["no-camera"]:reset_camera_settings()
```

## Photo Display

### show\_photo

Shows a photo in the player's hand.

```lua theme={null}
---@param image string URL of the photo
---@param location string? Optional location string
---@param timestamp number? Optional timestamp
exports["no-camera"]:show_photo("https://example.com/photo.jpg", "Vinewood Hills", 1738656000000)
```

### close\_photo

Closes the currently displayed photo.

```lua theme={null}
exports["no-camera"]:close_photo()
```

### is\_photo\_active

Checks if a photo is currently being displayed.

```lua theme={null}
---@return boolean is_active
local is_active = exports["no-camera"]:is_photo_active()
```

### focus\_photo

Focuses the current photo in fullscreen NUI view.

```lua theme={null}
exports["no-camera"]:focus_photo()
```

### unfocus\_photo

Unfocuses the current photo from fullscreen view.

```lua theme={null}
exports["no-camera"]:unfocus_photo()
```

### is\_photo\_focused

Checks if the photo is currently focused in fullscreen.

```lua theme={null}
---@return boolean is_focused
local is_focused = exports["no-camera"]:is_photo_focused()
```

### get\_current\_photo

Gets the current photo data.

```lua theme={null}
---@class PhotoData
---@field image string URL of the photo
---@field location? string Location where the photo was taken
---@field timestamp? number Unix timestamp when the photo was taken

---@return PhotoData? photo The current photo data or nil if none
local photo = exports["no-camera"]:get_current_photo()
```
