---
title: "GetVehicleNumberPlate | open.mp"
description: "获取车辆的牌照号码。"
canonical: https://omp.itsneufox.com/zh-CN/docs/scripting/functions/GetVehicleNumberPlate
language: zh-CN
---

# GetVehicleNumberPlate

注意

这个函数是在omp v1.1.0.2612中添加的，在以前的版本中不起作用！

## 描述

获取车辆的牌照号码。

## 参数

| 参数 | 说明 |
| --- | --- |
| vehicleid | 车辆 ID |
| plate\[\] | 用于存储车牌号的数组，通过引用传递。 |
| len = sizeof (plate) | 应当存储的车牌字符长度。 |

## 示例

```c
public OnGameModeInit()
{
    new vehicleid = CreateVehicle(560, 2096.1917, -1328.5150, 25.1059, 0.0000, 6, 0, 100);
    SetVehicleNumberPlate(vehicleid, "ABCD 123");

    new numberPlate[16];
    GetVehicleNumberPlate(vehicleid, numberPlate);
    // numberPlate = "ABCD 123"
    return 1;
}
```

## 相关函数

-   [SetVehicleNumberPlate](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/SetVehicleNumberPlate): 设置车辆牌照
