Agency Docs
Standalone

Agency-Garage 导出 & API

采用 Agency 设计风格的 FiveM 车库系统。在多个车库地点存取和管理所有载具,并支持 3D 预览。包含载具分类(汽车、船只、飞行器)、实时受损与燃油状态、扣押场、共享车库与帮派车库、载具搜索与收藏夹。配色同步管理员在免费.

v1.3.0付费5 页面

01客户端导出

导出说明
OpenGarage(garageId: string)打开对应 garage id 的车库菜单。如果 id 未知则返回 false。
RegisterGarage(garageId: string, data: table)在此客户端运行时添加车库,字段与 Config.Garages 相同。无访问权限时不会绘制标记或提示。也需在服务端进行注册。
IsBusy()当车库菜单或车辆预览显示在屏幕上时为 true,以便其他脚本隐藏其提示。

02服务端导出

导出说明
ImpoundVehicle(plate: string, price?: number, depot?: string)将车辆移至扣押车库并收取赎回费。默认扣押点为 depotlsimpound,默认费用为 Config.Impound.fee。成功返回 true,若车牌未知则返回 false。
IsVehicleStored(plate: string)若车辆停放在车库中则为 true。
GetVehicleState(plate: string)0 = 外出,1 = 已存放,2 = 已扣押,车牌未知时为 nil。
GetVehicleGarage(plate: string)返回车辆所属车库的 id,或返回 nil。
ForceStore(plate: string, garageId?: string)将车辆停放在车库中(默认 legion)并从世界中移除。返回 true 或 false。
GetPlayerVehicles(identifier: string)从数据库返回玩家的所有车辆。
RegisterGarage(garageId: string, data: table)在服务端运行时添加车库。Agency-Housing 将其用于房屋车库。

看完本页仍未解决?接下来由我们的支持团队接手。