最近我想新增一個玩家等級升級公告資訊的功能
想全體玩家皆可看見此資訊
雖然經測試過字幕有顯示出來
但是玩家ID遲遲沒有顯示只顯示後方資訊
請問要如何正確註冊get_user_name語法或者新增新的代嗎??
複製程式
public eDeath()
{
new attacker = read_data(1)
new damage = read_data(2)
new headshot = read_data(3)
new name[35]
SM3[damage] = false
SAKM4[damage] = false
SMP5[damage] = false
STMP[damage] = false
g_hasantidotegun[damage] = false
BunnyHop[damage] = false
HLight[damage] = false
if (attacker && (attacker != damage))
{
if (headshot)
{
ZPKillPoint[attacker] += 5
client_print(attacker, print_chat, "你爆頭消滅敵人.獲得 5 EXP經驗值.")
}
else
{
ZPKillPoint[attacker] += 3
client_print(attacker, print_chat, "你消滅敵人.獲得 3 EXP經驗值.")
}
while(ZPKillPoint[attacker] >= LEVELS[level[attacker]])
{
if(get_user_flags(attacker) & ACCESS_FLAG3)
levelpoint[attacker] += 4
else
levelpoint[attacker] += 4
ZPKillRank[attacker] += 1
level[attacker] += 1
client_print(0, print_chat, " %s 升級至[階級:%s | EXP:%d]^n", name, RANKS[ZPKillRank[id]], ZPKillPoint[id])
}
}
return PLUGIN_CONTINUE
}