> For the complete documentation index, see [llms.txt](https://abpstudios.gitbook.io/abp-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://abpstudios.gitbook.io/abp-docs/abp-headfriend/how-to/use-in-esx-or-qb.md).

# Use in ESX or QB

## Using ESX

Find Config.Framework and set it to 'esx', lower case and in quotes.

```lua
Config.Framework = "esx"
```

Search for Config.PlayerLoadEvent = nil and replace nil with 'esx:playerLoaded' with the quotes.

```lua
Config.PlayerLoadEvent = 'esx:playerLoaded'
```

## Using QB

Find Config.Framework and set it to 'qb', lower case and in quotes.

```lua
Config.Framework = "qb"
```

Search for Config.PlayerLoadEvent = nil and replace nil with 'QBCore:Client:OnPlayerLoaded' with the quotes.

```lua
Config.PlayerLoadEvent = 'QBCore:Client:OnPlayerLoaded'
```

## Using with Multicharacter

Find Config.Framework and set it to 'esx' or 'qb', lower case and in quotes.

```lua
Config.Framework = "esx" -- or 'qb'
```

Search for Config.PlayerLoadEvent = nil and keep 'nil' with the quotes.

```lua
Config.PlayerLoadEvent = nil
```

Now find your script that allows for multiple characters, you have two options.

1. &#x20;Use an event that lets you know when the player was loaded from the client.
2. &#x20;Apply an export function when the player is loaded from the server.

**For the first case**, we must know what event is executed when the player loads, in general it could be called as 'player:OnCharacterLoad', although it can vary in each script.

If you don't know which event it refers to, check with the developer of the script.

If you already found the event, replace the 'Config.PlayerLoadEvent' with the event in question.

Example:

```lua
Config.PlayerLoadEvent = 'player:OnCharacterLoad'
```

**IMPORTANT**, the event is just an example and it doesn't work if it's not the right one, please contact the developer of the multi-character resource before continuing.

**For the second case**, we must find the function where the character load is executed from its character script and we must apply the export function to register a player.

```lua
function loadCharacter(...)
    ...

    TriggerEvent('abp_headFriend::RegisterPlayer', source)

    ...
end
```
