# Use custom headtext

## Using Custom files

First, find on configuration and check your framework in use:&#x20;

*(Can be any framework, just remember the name)*

```lua
--- Current Supported options:
--- 'esx' ES Extended
--- 'qb'  QB-Core
--- 'standalone' Standalone configuration 

Config.Framework = "standalone"
```

Next, check the configuration and search for and use the next settings:

```lua
-- For exmple: AlexBanPer #1 - Test Name #1 
-- Only if are friends. 
Config.FriendAPI_UseIdAfterHeadName = true

--- If Config.FriendAPI_UseIdAfterHeadName is true, then PlayerServerId will be used; otherwise, a custom player ID can be set.
--- This funcion includes 'Unknown' text if player is not friends.
Config.FriendAPI_UseCustomIdAfterHeadName = true

-- On friendship request display SteamName or 'getUserHeadName' function
Config.FriendAPI_UseUserHeadNameInsteadSteamNameOnFriendRequest = true
```

Depending on **which framework we will use before**, we will look in&#x20;

```
'server/custom/{framework}.lua'
--- For this example
'server/custom/standalone.lua'
```

Find functions:

```lua
-------------------------------
-- In this function you can set it to fetch the player id, for example if you have an id corresponding to "#abc123" then you should use some function to get the player id and it will be displayed overhead.
function GetCustomHeadText(playerId)
    return GetPlayerName(playerId) .. " | " .. tostring(math.random(1000, 9999))
end

---- WIP
function GetCustomUnknownHeadText(playerId)
    return "Custom " .. Translate("UNKNOWN") .. " | " .. tostring(playerId)
end
------------------
```

So you can set up these functions for your custom IDs (for example, custom database ID, player ID, etc)


---

# 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://abpstudios.gitbook.io/abp-docs/abp-headfriend/how-to/use-custom-headtext.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.
