# Installation

#### Step 1: Download the Script

Download the latest version of **Ayccoe's MultiCharacter** from your keymaster.

#### Step 2: Add to Resources

Place the script folder in your server's `resources` directory.

#### Step 3: Edit Resource Name

Rename the resource folder by omitting `-os` or `-escrow`, renaming it to `ayc-multicharacter` .

#### Step 4: Update server.cfg

Add the following line to your `server.cfg` file:

```
ensure ayc-multicharacter
```

#### Step 5: Install SQL

The script requires a database setup. Follow these steps:

1. Locate the SQL file in the `install` folder of the script directory. They are named depending on your framework.
2. Access your MySQL database using a tool such as **phpMyAdmin** , **HeidiSQL** , or **MySQL Workbench** .
3. Import the SQL file into your database by running the script. This will create the necessary tables for the script to function.

#### Step 6: Configure the Script

Edit the `config.lua` file to customize the settings according to your server's needs. Refer to the [Configuration Overview ](https://ayccoes-assets.gitbook.io/ayccoes-assets/configurations)section for details.

#### Step 7: Edit The Core Files (Qbox Only)

* Navigate to the file `qbx_core/config/client.lua`.
* Locate the following line:

```lua
useExternalCharacters = false, -- Whether you have an external character management resource. (If true, disables the character management inside the core)
```

* Set it to true.

This change ensures that the internal character management system within QBX Core is disabled, allowing your external character management resource to take over.

***

* Navigate to the file `qbx_core/server/player.lua`.
* Add the following line at the end of the file:

```lua
exports('DeleteCharacter2', DeleteCharacter)
```

This ensures that the delete character function works as expected.

***

* Open the `fxmanifest.lua` file within the script.
* Locate the following commented line:

```lua
-- '@ox_lib/init.lua'
```

* Remove the leading `--` to uncomment it.

This step initializes OxLib, which is essential for the functionality of certain features in your script.

***

* Navigate to the file `server/framework.lua`.
* Locate line 409, which should look like this:

```lua
webhook = nil, -- your web hook
```

* Replace `nil` with your webhook URL as a string. For example:

```lua
webhook = "https://your-webhook-url-here.com", -- your web hook
```

By following these steps, you will successfully configure your webhook for use in the script. Ensure that the URL is valid and accessible to avoid any issues with functionality.

#### Step 8: Restart the Server

Restart your server to apply the changes and start using the script.
