|
楼主 |
发表于 2008-6-24 08:23:21
|
显示全部楼层
来自 中国–香港
回复: 攻擊和TK攻擊問題
寫好了...
不知道能不能優化一下
[PHP]#include <amxmodx>
public plugin_init() {
register_plugin("Bullet Damage","1.0","ToKyo")
register_event("Damage", "damage_msg", "b", "2!0", "3=0", "4!0")
register_cvar("bullet_damage","1")
return PLUGIN_CONTINUE
}
public damage_msg(vIndex)
{
new attacker = get_user_attacker(vIndex)
new damage = read_data(2)
if(get_user_team(attacker) == get_user_team(vIndex)) {
static userName[32];
get_user_name(attacker, userName, 31);
set_hudmessage(0, 255, 0, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, 7)
show_hudmessage(vIndex,"%i^n%s", damage, userName);
}
if(get_user_team(attacker) != get_user_team(vIndex)) {
static userName[32];
get_user_name(attacker, userName, 31);
set_hudmessage(255, 0, 0, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, 7)
show_hudmessage(vIndex,"%i^n%s", damage, userName);
}
return PLUGIN_CONTINUE
}[/PHP] |
|