# 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 qb-core
ensure dusa_multicharacter
ensure dusa_spawnselector
```

**Run sql file**

You will find insert.sql file inside your dusa\_multicharacter script, open it on your database and press run for inserting

## <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
DUSA.Framework = "qb" -- qb / oldqb
DUSA.CustomFramework = true
function CustomFrameworkExport() -- Add the export here, as in the following example.
    QBCore = exports['qb-core']:GetCoreObject()
end

DUSA.PlayerLoadedExport = 'QBCore:Server:PlayerLoaded'
DUSA.PlayerUnloadedExport = 'QBCore:Server:OnPlayerUnload'
```

#### **Custom Spawnselector ( IF YOU WANT TO USE ANOTHER SPAWN SELECTOR SCRIPT )**

Set DUSA.CustomSpawnSelector = true

Place your spawn selector open event inside function

```lua
DUSA.CustomSpawnSelector = false    -- true value will disable dusa_spawnselector, will run export below
function CustomSpawnSelector()
    -- Add your custom spawn selector trigger here (client side only)
end
```

#### **Translation**

You can edit these lines for all translations ( UI included )

```lua
DUSA.Language = {
    Server_Name = 'Dusa Roleplay',
    Select_Character = 'Select Character',
    Create_Character = 'Create New Character',
    Buy_Slot = 'Buy New Character Slot',
    Delete_Button = 'Delete',
    Player_Button = 'Player',
    Bank_Account = 'Bank Account',
    Cash_Money = 'Cash Money',
    Dateof_Birth = 'Date of Birth',
    Phone_Number = 'Phone Number',
    Gender_Translation = 'Gender',
    Slot_Code = 'Slot Code',
    Buy_Code = 'Buy Code',
    Cancel_Text = 'Cancel',
    Accept_Text = 'Accept',
    Create_Text = 'Create',
    Footer_Text = 'Dusa Roleplay',
    Footer_Text2 = '© DUSA 2023',
}
```

#### Trigger Anything When Player Loaded

Configure which items will be given when player loaded

Trigger anything when player is loaded after character spawn

```lua
-- Give Items When Player Loaded
DUSA.StarterItems = {
    {item = "id_card", amount = 1},
    {item = "water_bottle", amount = 3},
    {item = "tosti", amount = 3},
    {item = "cash", amount = 5000},
    {item = "blue_phone", amount = 1}
}

-- Handle Player Load
DUSA.PlayerLoaded = function(identifier)
    -- Trigger an event when player is loaded (Client Side)
end
```

## <img src="https://870197722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMeOc2gAfx3fqBg4QY2uJ%2Fuploads%2FyAI89ka8nrOrFklc5cDj%2Findir.png?alt=media&#x26;token=7cc214e1-67ae-4215-bd82-f436b9eadfd2" alt="" data-size="line"> Tebex Integration

1 - Find your tebex secret key (From tebex page)

2 - Add this to server.cfg -> set sv\_tebexSecret "secretkey"

3 - Create a package for sell slot

4 - Check below and find "Add Command"

5 - Paste this command -> dusa\_activateslot {"transid": "{transaction}"}

6 - Click setting icon at the right and change Require Player To Be Online > Execute the command even if the player is offline
