FiveM 脚本,它允许服务器所有者使用 NPC 或道具创建交互式商业菜单。每个商家都可以有一个独特的菜单,玩家可以与 NPC 或道具互动以查看商家菜单并进行购买。
特征: 完全可针对企业、NPC 或道具进行配置。 显示每个企业的自定义菜单图像。 使用 qb-target 进行交互,便于配置。 可选择使用 ped (NPC) 或 prop 进行业务交互。
示例配置:
Config.Businesses = {
uwu_cafe = {
usePed = true, -- Use NPC instead of prop
pedModel = 'a_m_m_business_01', -- NPC model
coords = vector3(100.0, -100.0, 29.0), -- NPC spawn coordinates
menuImage = 'uwu.png' -- Menu image for the business
},
another_business = {
usePed = false, -- Use prop
propModel = 'prop_bench_01', -- Prop model
propCoords = vector3(200.0, -200.0, 29.0), -- Prop coordinates
menuImage = 'business_menu.png' -- Menu image for the business
}
}
- Ped vs. Prop:通过在配置中将 usePed 设置为 true 或 false,选择每个企业是使用 NPC (ped) 还是 prop。
- 菜单图像:将 menuImage 值设置为要在菜单中显示的图像的文件名。
- 交互:使用 qb-target 配置与 NPC/prop 的交互。
用法:
-
当玩家与 NPC/道具互动时,相应的菜单图像将显示在 NUI 窗口中。
-
玩家可以通过按 “Esc” 键关闭菜单。
V1.1 版 添加了 ox_target 支持
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
- 最新
- 最热
只看作者