// 注册一个第三方称号,字号为18
VipLogo.Call("API_RegisterThirdPartyTitle", this, new Func<BasePlayer, string>(player => "[测试称号]"), 18);
//示例:
if (VipLogo != null)
{
// 注册一个根据玩家击杀数显示的称号
VipLogo.Call("API_RegisterThirdPartyTitle", this, new Func<BasePlayer, string>(player => {
int kills = GetPlayerKills(player);
if (kills > 100)
return "<color=#ff0000>[杀神]</color>";
else if (kills > 50)
return "<color=#ff9900>[杀手]</color>";
else if (kills > 10)
return "<color=#ffff00>[猎人]</color>";
return "";
}), 14);
}
// 获取玩家完整称号,包含颜色,不包含字号
string title = VipLogo.Call<string>("API_GetPlayerFullTitle", player, true, false);