---
title: "GetVehicleParamsCarWindows | open.mp"
description: "获取车辆车窗的当前状态。"
canonical: https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GetVehicleParamsCarWindows
language: zh-CN
---

# GetVehicleParamsCarWindows

注意

这个函数是在SA-MP 0.3.7中添加的，在以前的版本中不起作用！

## 描述

获取车辆各个车窗的当前开启状态

| 参数 | 说明 |
| --- | --- |
| vehicleid | 目标车辆 ID |
| &bool:frontLeft | 用于存储驾驶员侧车窗状态的整型变量（按引用传递） |
| &bool:frontRight | 用于存储副驾驶侧车窗状态的整型变量（按引用传递） |
| &bool:rearLeft | 用于存储左后车窗状态的整型变量（若车辆存在该车窗） |
| &bool:rearRight | 用于存储右后车窗状态的整型变量（若车辆存在该车窗） |

## 返回值

车辆的车窗状态将被存储到指定的变量中。

## 注意事项

备注

各变量返回值对应状态：

-   **\-1**: 未设置车窗状态（通常为关闭状态，除非显式设置为-1）
-   **0**: 开启状态
-   **1**: 关闭状态

## 相关函数

-   [SetVehicleParamsCarWindows](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/SetVehicleParamsCarWindows): 控制车辆车窗的开关状态
-   [GetVehicleParamsCarDoors](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GetVehicleParamsCarDoors): 获取车辆车门的当前状态
-   [SetVehicleParamsCarDoors](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/SetVehicleParamsCarDoors): 控制车辆车门的开关状态
