跳到主要内容

GetPlayerObjectModel

注意

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

描述

获取玩家物体的模型 ID

参数名说明
playerid需要查询的玩家 ID
objectid需要获取模型 ID 的玩家物体 ID

返回值

玩家物体的模型 ID

若玩家或物体不存在,返回**-10**

示例代码

public OnPlayerConnect(playerid)
{
new objectid = CreatePlayerObject(playerid, 19609, 666.57239, 1750.79749, 4.95627, 0.00000, 0.00000, -156.00000);

new modelid = GetPlayerObjectModel(playerid, objectid);
printf("物体模型ID: %d", modelid); // 输出: "物体模型ID: 19609"
return 1;
}

相关函数