下面是引用 zdt 于 2011-03-05 22:13 发表的 炸弹啦...,|请问怎么做到判定是否击中敌人: 我想要做到被手雷炸中后发生某些东西...例如得到一支枪...这是后话了...请教一下...
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type) { // Non-player damage or self damage if (victim == attacker || !is_user_connected(attacker)) return HAM_IGNORED; if (damage_type & (1<<24)) { ...... } }