跳到主要内容

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;
}

相关函数