---
title: "SetVehicleParamsCarWindows | open.mp"
description: "允许开关车辆的车窗。"
canonical: https://omp.itsneufox.com/zh-CN/docs/scripting/functions/SetVehicleParamsCarWindows
language: zh-CN
---

# SetVehicleParamsCarWindows

注意

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

## 描述

控制车辆车窗的开关状态。

| 参数 | 说明 |
| --- | --- |
| vehicleid | 要设置车窗的车辆 ID |
| bool:frontLeft | 驾驶座车窗状态（0=开启，1=关闭） |
| bool:frontRight | 副驾驶座车窗状态（0=开启，1=关闭） |
| bool:rearLeft | 左后车窗状态（若存在，0=开启，1=关闭） |
| bool:rearRight | 右后车窗状态（若存在，0=开启，1=关闭） |

## 返回值

**true** - 函数执行成功。

**false** - 函数执行失败。车辆不存在。

## 相关函数

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