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 将其用于房屋车库。 |
