fivem-nui
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFiveM NUI Development
FiveM NUI开发
Best practices for FiveM NUI development — fullscreen UIs, NUI callbacks, messaging, and UI integration. Use this skill whenever you are dealing with FiveM user interfaces to obtain domain-specific knowledge.
FiveM NUI开发最佳实践——全屏UI、NUI回调、消息传递与UI集成。当你处理FiveM用户界面相关工作时,可使用此技能获取领域专属知识。
When to use
使用场景
- User asks how to create a UI for FiveM.
- Creating or editing HTML/CSS/JS files for FiveM resources.
- Setting up in fxmanifest.lua.
ui_page - Questions about NUI callbacks, SendNUIMessage, or SetNUIFocus.
- Need to look up natives → point to https://docs.fivem.net/natives/.
- 用户询问如何为FiveM创建UI。
- 创建或编辑FiveM资源的HTML/CSS/JS文件。
- 在fxmanifest.lua中配置。
ui_page - 关于NUI回调、SendNUIMessage或SetNUIFocus的问题。
- 需要查阅原生函数时→指向https://docs.fivem.net/natives/。
How to use
使用方法
Read individual rule files for detailed explanations and examples:
- rules/setup.md — Setting up NUI in a resource: ui_page, files entry, folder structure.
- rules/fullscreen-nui.md — Creating fullscreen NUI pages: SEND_NUI_MESSAGE, SET_NUI_FOCUS, developer tools, referencing assets.
- rules/nui-callbacks.md — NUI callbacks: RegisterNUICallback, fetch requests, data handling, security.
- rules/best-practices.md — Best practices: performance, security, communication patterns, error handling.
- rules/reference-links.md — Official docs and natives reference.
阅读单个规则文件获取详细说明和示例:
- rules/setup.md — 在资源中配置NUI:ui_page、文件条目、文件夹结构。
- rules/fullscreen-nui.md — 创建全屏NUI页面:SEND_NUI_MESSAGE、SET_NUI_FOCUS、开发者工具、资源引用。
- rules/nui-callbacks.md — NUI回调:RegisterNUICallback、fetch请求、数据处理、安全性。
- rules/best-practices.md — 最佳实践:性能、安全性、通信模式、错误处理。
- rules/reference-links.md — 官方文档与原生函数参考。