GetPlayerCustomSkin
注意
这个函数是在SA-MP 0.3.DL R1中添加的,在以前的版本中不起作用!
描述
获取玩家通过AddCharModel下载的自定义皮肤类 ID
参数名 | 说明 |
---|---|
playerid | 需要获取皮肤的玩家 ID |
返回值
通过 AddCharModel 函数设置的 newid 参数值(若未使用自定义皮肤则返回 0)
示例代码
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/customskin", true))
{
new string[32];
new customSkin = GetPlayerCustomSkin(playerid);
format(string, sizeof(string), "您的自定义皮肤ID: %d", customSkin);
SendClientMessage(playerid, -1, string);
return 1;
}
return 0;
}
相关函数
- GetPlayerSkin: 获取玩家当前使用的皮肤 ID
- SetPlayerSkin: 设置玩家皮肤模型