下面是引用 郑柏升 于 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 发表的 : 我之前就是用这原理去整但杀了电脑却不加经验...........