下面是引用 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)) { ...... } }