下面是引用 鄭柏昇 於 2011-12-03 22:21 發表的 : 我是sma新手,不一定正確victim似乎是受害者呢應該改成攻擊者,有錯請告訴我(刪)
new kill[33] static attacker; attacker = read_data(1) kill[attacker]++ new player_kills = kill[attacker] if(is_user_player(attacker) == attacker &&i s_user_bot(id) == victim) { switch (player_kills) { case 1: { g_xp[id] += 50 }
下面是引用 csoken 於 2011-12-04 01:06 發表的 : 複製程式 new kill[33] static attacker; attacker = read_data(1) kill[attacker]++ new player_kills = kill[attacker] if(is_user_player(attacker) == attacker &&i s_user_bot(id) == victim) { switch (player_kills) { case 1: { g_xp[id] += 50 } 不知道這樣對不對...我是以我的某一個插件來試用看看
public plugin_init() RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
// Ham Player Killed Forward public fw_PlayerKilled(victim, attacker, shouldgib) { if (!is_user_connected(attacker)) return HAM_IGNORED if (is_user_bot(victim)) g_xp[attacker] += 50 return HAM_IGNORED }
下面是引用 pro_on_0 於 2011-12-06 18:55 發表的 : 複製程式 public plugin_init() RegisterHam(Ham_Killed, "player", "fw_PlayerKilled") 複製程式 // Ham Player Killed Forward public fw_PlayerKilled(victim, attacker, shouldgib) { if (!is_user_connected(attacker)) return HAM_IGNORED if (is_user_bot(victim)) g_xp[attacker] += 50 return HAM_IGNORED }
下面是引用 絕影華 於 2011-12-07 00:52 發表的 : 我之前就是用這原理去整但殺了電腦卻不加經驗...........