> For the complete documentation index, see [llms.txt](https://ak-scripts.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ak-scripts.gitbook.io/docs/yi-lai/markdown/ti-huan-kuang-jia-mo-ren-zhi/esx/tong-zhi-notify.md).

# 通知（Notify）

## ⚙️ 如何更改 ESX 的默认通知

> 本节将教你如何将 `ESX` **默认通知** 替换为 `ak-lib` **通知**。
>
> 由于 `ESX` 不同版本在函数结构上略有差异，本次示例基于 `ESX` `1.13.4` 进行讲解。

***

### 🧭 步骤一：导航到函数文件

前往以下路径：

```
es_extended/client/functions.lua
```

在文件中搜索以下函数（约在第40行）：

```lua
local addonResourcesState
```

在对应表中添加这一行：

```lua
['ak-lib'] = GetResourceState('ak-lib') ~= 'missing',
```

***

### 🧩 步骤二：替换 ESX 默认通知函数

前往以下路径：

```
es_extended/client/functions.lua
```

在文件中搜索以下函数（约在第160行）：

```lua
function ESX.ShowNotification
```

将整段函数替换为以下内容：

```lua
function ESX.ShowNotification(message, notifyType, title)
    if not message or message == "" then return end
    exports['ak-lib']:Notify({
        title    = title,
        message  = message,
        type     = notifyType,
    })
end
```

***


---

# 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://ak-scripts.gitbook.io/docs/yi-lai/markdown/ti-huan-kuang-jia-mo-ren-zhi/esx/tong-zhi-notify.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.
