# Installation & Configuration & Integration

## <img src="https://870197722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMeOc2gAfx3fqBg4QY2uJ%2Fuploads%2FTnsRkKjlDyvVyL7kla7D%2F220520fce154e4ba7a608c3ecd3cb41c-removebg-preview.png?alt=media&#x26;token=99374aa9-efce-4506-8152-d404494e34ed" alt="" data-size="line">Step By Step Installation

**Install**

Login to your [keymaster](https://keymaster.fivem.net/asset-grants/) account, check Granted Assets section and download script you bought from us&#x20;

**Script Start Order**

```
ensure es_extended
ensure dialog
ensure dusa_photographer
```

**Add Items ( Item icons can be found inside dusa\_photographer > items folder )**

For default ESX ( Run this sql )

```
INSERT INTO `items` (name, label, weight) VALUES
	('camera','Camera', 1),
	('photo','Photo', 1),
	('simoncoin','Simon Coin', 1)
;
```

For OX Inventory

```
	['camera'] = {
		label = 'Camera',
		weight = 500,
		stack = true,
		close = true,
		description = nil
	},

	['photo'] = {
		label = 'Photo',
		weight = 1,
		stack = false,
		close = true,
		description = nil
	},
	
	['simoncoin'] = {
		label = 'Simon Coin',
		weight = 1,
		stack = true,
		close = true,
		description = nil
	},
```

## <img src="https://870197722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMeOc2gAfx3fqBg4QY2uJ%2Fuploads%2F4aiKhHzAPeGiB2A4DFMs%2Fc44b4e80c2f4dfff7d698eae69c85a98-removebg-preview.png?alt=media&#x26;token=84674aef-d34f-4541-aaec-cd415b9dd5a3" alt="" data-size="line">Configuration

#### **Set Framework**

```lua
Config.Framework = "esx" -- esx / oldesx
Config.CustomFramework = true
function CustomFrameworkExport() -- Add the export here, as in the following example.
    ESX = exports["es_extended"]:getSharedObject()
end
Config.PlayerLoadEvent = 'esx:playerLoaded'
```

#### **Configure Target & Inventory**

Change options for your server

```lua
Config.Inventory = 'ox' -- ox / qbtoesx / normal (normal inventory doesnt include metadata photo item)
Config.MySQL = 'oxmysql' -- oxmysql / ghmattimysql / mysql-async
Config.Target = 'ox_target' -- ox_target / qtarget / qb-target / bt-target
```

#### **Translation**

Find Config.Dialogues in config and edit strings

**Change Coin Amount When Task Is Done**

```lua
Config.Reward = { -- \ Coin reward will be given
    Task_1 = 50,
    Task_2 = 35,
    Task_3 = 75,
    Task_4 = 40,
    Task_5 = 35,
    Task_6 = 30
}

Config.CoinPrice = 50
```

#### Changing money amount when player take random civilian photo

Returns a random value between specified values

```lua
Config.MinAmount = 50
Config.MaxAmount = 350
```

## <img src="https://870197722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMeOc2gAfx3fqBg4QY2uJ%2Fuploads%2F9brzgJeFMH5PMwSydqSx%2Flock.png?alt=media&#x26;token=1227d038-3b2d-4482-a639-caab83f3b3c2" alt="" data-size="line"> Adding New Zones for Photographing

You can find everything you need to know from this video! Credits goes to FlenN

{% embed url="<https://youtu.be/gRT5eGgbrug>" %}

After taking coordinates find Config.Zones in config.lua

Replace coordinates with this format

```
    ['pier'] = {        
        points = {
            vector2(-1609.3408203125, -946.39801025391),
            vector2(-1804.9250488281, -1178.9588623047),
            vector2(-1831.7236328125, -1157.5791015625),
            vector2(-1878.3553466797, -1213.0631103516),
            vector2(-1823.1083984375, -1259.9340820313),
            vector2(-1807.1856689453, -1242.6895751953),
            vector2(-1813.1685791016, -1235.8214111328),
            vector2(-1782.1947021484, -1198.9328613281),
            vector2(-1791.9382324219, -1190.732421875),
            vector2(-1735.6870117188, -1123.0230712891),
            vector2(-1675.9127197266, -1172.5362548828),
            vector2(-1519.0119628906, -983.07397460938)
        },
        minZ = 2.035144805908,
        maxZ = 75.059997558594,                      
    },
```
