跳到主要内容

GetVehicleSeats

注意

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

描述

获取指定车辆模型的座位数量。

参数名说明
modelid目标车辆的模型 ID

返回值

成功返回座位数量,若模型 ID 无效则返回255

示例

new vehicleid = GetPlayerVehicleID(playerid);
new modelid = GetVehicleModel(vehicleid);
new seats = GetVehicleSeats(modelid);

new string[64];
format(string, sizeof(string), "当前车辆座位数: %d", seats);
SendClientMessage(playerid, -1, string);

相关函数