|
楼主 |
发表于 2008-8-20 15:38:55
|
显示全部楼层
来自 中国–广西–百色
回复: 请帮个忙,就是AK或M4每打中一枪就(共)掉50血的插件.
那个复杂化.................能否在这里帮修改一下...............
#include <amxmodx>
#include <fun>
new p_amx_bullet_damage
public plugin_init(){
register_plugin("Bullet Damage","1.0","datang")
register_event("Damage", "damage_msg", "b", "2!0", "3=0", "4!0")
p_amx_bullet_damage = register_cvar("amx_bullet_damage","1")
return PLUGIN_CONTINUE
}
public damage_msg(vIndex){
new aIndex = get_user_attacker(vIndex)
if ( get_pcvar_float(p_amx_bullet_damage) ){
if( user_has_weapon(aIndex, CSW_M4A1) || user_has_weapon(aIndex, CSW_AK47) || user_has_weapon(aIndex, CSW_DEAGLE) )
set_user_health ( vIndex, get_user_health(vIndex) - 40 );
}
return PLUGIN_CONTINUE
} |
|