# xakra\_camera

## Requirements

* [vorp\_core](https://github.com/VORPCORE/vorp-core-lua)
* [vorp\_inventory](https://github.com/VORPCORE/vorp_inventory-v2)

***

## Installation

1. Copy the script into a folder (to choose) from the 'resources' folder.
2. Add 'ensure xakra\_camera' in the 'Resources.cfg' document
3. Configure the 'config.lua' to adapt the script to your server.

***

## Config & Framework

<details open>

<summary>config.lua</summary>

{% code expandable="true" %}

```lua
Config = {}

Config.Lang = 'es'  -- 'en', 'es' 

-- KEYS: https://github.com/femga/rdr3_discoveries/tree/master/Controls
Config.KeyCam = 0x53296B75	-- MOUSE RIGHT CLICK
Config.KeyPickUpCam = 0xB28318C0	-- MOUSE LEFT CLICK
Config.KeyMoreZoom = 0x911CB09E	-- UP ARROW
Config.KeyLessZoom = 0x4403F97F	-- DOWN ARROW
Config.KeyNextFilter = 0x65F9EC5B	-- RIGHT ARROW
Config.KeyOldFilter = 0x20190AB4	-- LEFT ARROW
Config.KeyTakePhoto = 0x2CD5343E    -- ENTER
Config.ChangeBackground = { joaat('INPUT_MOVE_DOWN_ONLY'), joaat('INPUT_MOVE_UP_ONLY') }    -- W / S

Config.TakePhotoTime = 2000 -- Time for players to screenshot

Config.ItemFixedCamera = 'fixedcamera'  -- Fixed camera item name

Config.CommandsHUD = {  -- List of commands to enable and disable HUD
    { disable = '', enable = '' }, -- disable = Command to disable HUD, enable = Command to enable HUD
    -- { disable = '', enable = '' }, -- disable = Command to disable HUD, enable = Command to enable HUD
}

-- Config.SudioCameraJobs = {  -- job list or false 
--     'photographer',
--     -- 'example',
-- }

-- Location of saved images: 'C:\Users\User\Saved Games\CitizenFX\RDR2'
Config.CommandGalleryPhotos = 'gallery' -- 'command'(Command to open the photo gallery) or false (Disable command to open gallery)

Config.Zoom = { -- List of zooms of the advanced camera and fixed camera
    40.0,
    30.0,
    20.0,
    10.0,
}

-- animpostfx: https://github.com/femga/rdr3_discoveries/blob/master/graphics/animpostfx/animpostfx.lua
Config.Filters = {  -- Fixed camera and advanced camera filter List
    'PhotoMode_FilterGame01',
    'PhotoMode_FilterGame02',
    'PhotoMode_FilterGame03',
    'PhotoMode_FilterGame04',
    'PhotoMode_FilterGame05',
    'PhotoMode_FilterGame06',
    'PhotoMode_FilterGame07',
    'PhotoMode_FilterGame08',
    'PhotoMode_FilterGame09',
    'PhotoMode_FilterGame10',
    'PhotoMode_FilterModern01',
    'PhotoMode_FilterModern02',
    'PhotoMode_FilterModern03',
    'PhotoMode_FilterModern04',
    'PhotoMode_FilterModern05',
    'PhotoMode_FilterModern06',
    'PhotoMode_FilterModern07',
    'PhotoMode_FilterModern08',
    'PhotoMode_FilterModern09',
    'PhotoMode_FilterModern10',
    'PhotoMode_FilterVintage01',
    'PhotoMode_FilterVintage02',
    'PhotoMode_FilterVintage03',
    'PhotoMode_FilterVintage04',
    'PhotoMode_FilterVintage05',
    'PhotoMode_FilterVintage06',
    'PhotoMode_FilterVintage07',
    'PhotoMode_FilterVintage08',
    'PhotoMode_FilterVintage09',
    'PhotoMode_FilterVintage10',
    'PhotoMode_FilterGame11',
    'PhotoMode_FilterGame12',
    'PhotoMode_FilterGame13',
    'PhotoMode_FilterGame18',
}



```

{% endcode %}

</details>

<details open>

<summary>framework</summary>

server.lua

{% code expandable="true" %}

```lua
local VORPcore

TriggerEvent("getCore", function(core)
    VORPcore = core
end)

function NotifyLeft(source, title, subtitle, dict, icon, time, color)
	VORPcore.NotifyLeft(source, title, subtitle, dict, icon, time, color)
end

function NotifyAvanced(source, title, dict, icon, color, time)
	VORPcore.NotifyAvanced(source, title, dict, icon, color, time)
end

function GetCharacter(source)
    -- .job
    return VORPcore.getUser(source).getUsedCharacter
end

function RegisterUsableItem(item, cb)
    -- data.source
	exports.vorp_inventory:registerUsableItem(item, function(data)
        cb(data)
    end)
end

function addItem(source, item, amount, metadata)
    exports.vorp_inventory:addItem(source, item, amount, metadata)
end

function subItem(source, item, amount)
    exports.vorp_inventory:subItem(source, item, amount)
end

function CloseInv(source, invId)
    exports.vorp_inventory:closeInventory(source, invId)
end
```

{% endcode %}

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xakra-scripts.gitbook.io/xakra-scripts-docs/redm-docs/xakra_camera.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
