> For the complete documentation index, see [llms.txt](https://bytexcripts.gitbook.io/bytexcripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bytexcripts.gitbook.io/bytexcripts-docs/npc-taxi/custom-functions.md).

# Custom Functions

<div align="left"><figure><img src="https://3370059127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSyiKILXmwnBdMbh66tQn%2Fuploads%2Ft09lg9ZgDQKIEJiKdvMP%2F6e1638392de4d052be1a881cc9e179e9.png?alt=media&amp;token=ea82b567-5efe-4d7b-aa86-c67a594bbddf" alt="" width="18"><figcaption></figcaption></figure></div>

Hemos añadido dos funciones custom las cuales **no se puede cambiar el nombre** de las mismas ya que eso afectaría al código principal. Aquí le dejamos un poco más de información para que sepa que añadir dentro de las funciones:

{% code title="custom\_functions.lua" overflow="wrap" lineNumbers="true" %}

```lua
customNotification(msg, type)
```

{% endcode %}

* El parámetro `msg` es el mensaje que aparece en la notificación, eso significa que en el export o evento que utilice su servidor para enseñar las notificaciones, deberá pasar `msg` como el mensaje.
* El parámetro `type` es el tipo de notificación que es, eso significa que si es un error el `type` será igual a error. Los tipos que hay son los siguientes: `"error"`, `"success"` y `"primary"`. Si su sistema de notificaciones no usa `type`, puede ignorar este parámetro.

{% code title="custom\_functions.lua" overflow="wrap" lineNumbers="true" %}

```lua
customDisplayHelpText(msg)
```

{% endcode %}

* El parámetro `msg` es el mensaje que aparece en el Help Text UI, eso significa que en el export o evento que utilice su servidor para enseñar el Help Text UI, deberá pasar `msg` como el mensaje.

<div align="left"><figure><img src="https://3370059127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSyiKILXmwnBdMbh66tQn%2Fuploads%2FHy2HzMTy2vnjfGKMCDGz%2F6e1638392de4d052be1a881cc9e179e9.png?alt=media&amp;token=322c750b-7499-44e0-8167-8fad38d7d021" alt="" width="18"><figcaption></figcaption></figure></div>

We have added two custom functions whose names cannot be changed, as doing so would affect the main code. Below is more information to guide you on what to include within these functions:

{% code title="custom\_functions.lua" overflow="wrap" lineNumbers="true" %}

```lua
customNotification(msg, type)
```

{% endcode %}

* The `msg` parameter is the message displayed in the notification. This means that in the export or event your server uses to display notifications, you should pass `msg` as the message.
* The `type` parameter specifies the type of notification. For example, if it is an error, `type` should be set to `"error"`. The available types are: `"error"`, `"success"` and `"primary"`. If your notification system does not use `type`, you can ignore this parameter.

{% code title="custom\_functions.lua" overflow="wrap" lineNumbers="true" %}

```lua
customDisplayHelpText(msg)
```

{% endcode %}

* The `msg` parameter is the message displayed in the Help Text UI. This means that in the export or event your server uses to display the Help Text UI, you should pass `msg` as the message.
