AMXX等級系統殺BOT沒有加EXP

Home Home
引用 | 編輯 -__-
2012-06-16 09:41
樓主
推文 x0
public fw_PlayerKilled(victim, attacker, shouldgib)
{
        if (attacker == victim  || !is_user_connected(attacker))
                 return HAM_IGNORED
        
        g_xp[attacker] +=50

        return HAM_IGNORED
}

EG:我想kill bot 有50exp加.點寫?我試過用if(is_user_bot(attacker)同if(is_user_bot(victim)都唔ok

 解答100$$表情

獻花 x0
引用 | 編輯 99wudi
2012-06-16 10:35
1樓
  
關於bot,不是這一個函數可以弄。完整sma裏弄才行的

獻花 x0
引用 | 編輯 -__-
2012-06-16 11:30
2樓
  
下面是引用 99wudi 於 2012-06-16 10:35 發表的 : 到引言文
關於bot,不是這一個函數可以弄。完整sma裏弄才行的

你識唔識寫?_?表情

獻花 x0
引用 | 編輯 kevin961104
2012-06-16 13:52
3樓
  
你需要將這個
支援BOT

獻花 x0
引用 | 編輯 -__-
2012-06-16 17:43
4樓
  
下面是引用 kevin961104 於 2012-06-16 13:52 發表的 : 到引言文
你需要將這個
支援BOT



我系問sma點寫?

獻花 x0
引用 | 編輯 kevin961104
2012-06-16 21:27
5樓
  
下面是引用 -__- 於 2012-06-16 17:43 發表的 : 到引言文




我系問sma點寫?



發問時 請你態度好一點
還有不要在這裡用口語



複製程式

new g_czbot
public client_putinserver(id)
{
 new classname[32]
 pev(id, pev_classname, classname, 31)
 
 if (!equal(classname, "player") && !g_czbot)
 {
 set_task(0.1, "registerham_from_czbot", id)
 g_czbot = true
 }
}
public registerham_from_czbot(id)
{
 RegisterHamFromEntity(Ham_Killed,id,"fw_PlayerKilled")
}




獻花 x3
引用 | 編輯 -__-
2012-06-17 15:36
6樓
  
下面是引用 kevin961104 於 2012-06-16 21:27 發表的 : 到引言文




發問時 請你態度好一點
還有不要在這裡用口語



複製程式

new g_czbot
public client_putinserver(id)
{
 new classname[32]
 pev(id, pev_classname, classname, 31)
 
 if (!equal(classname, "player") && !g_czbot)
 {
 set_task(0.1, "registerham_from_czbot", id)
 g_czbot = true
 }
}
public registerham_from_czbot(id)
{
 RegisterHamFromEntity(Ham_Killed,id,"fw_PlayerKilled")
}




有點不明白,如果寫左fw_PlayerKilled要點寫呢?

獻花 x0
引用 | 編輯 lf2man123
2012-06-19 00:37
7樓
  
下面是引用 -__- 於 2012-06-17 15:36 發表的 : 到引言文



有點不明白,如果寫左fw_PlayerKilled要點寫呢?

你要看看那個public fw_PlayerKilled中的...

獻花 x0