# Customize functions

{% hint style="info" %}
You can find the functions in the custom\_event.lua
{% endhint %}

## Server

***

### Player Item Check

The function must return a bool whether the player owns the item or not

```lua
function HasPlayerItem(xPlayer, item)
    return xPlayer.getInventoryItem(item).count > 0
end
```

#### Parameters 🛒

xPlayer(table) = Is the Player object from es\_extended. Show [here ](https://documentation.esx-framework.org/legacy/installation)for find more information

item(string) = Is the item name that is set as Config.ItemName in the Config.

#### Return ↪️

true = Player own the Item

false = The player does not own the item

***

### Player Name on GPS

This function returns the player name displayed in the card legend. By default, the roleplay character name is displayed.

```lua
function GetPlayerGPSName(xPlayer)
    return xPlayer.getName()
end
```

#### Parameters 🛒

xPlayer(table) = Is the Player object from es\_extended. Show [here ](https://documentation.esx-framework.org/legacy/installation)for find more information

#### Return ↪️

Playername(string) = The player name whiche displayed in the card legend.

{% hint style="danger" %}
You're missing an important feature! Create a ticket on our [Discord](https://discord.gg/rSxQEJnC7a) and we'll see what we can do!
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://novel-devolution.gitbook.io/novel_devolution/novel-jobgps-esx/customize-functions.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.
