--------------first----------------
Quote:
new gphys[501][3]
public plugin_init() {
set_task(1.0,"phys")
}
public phys()
while((ent = find_ent_by_class(ent, "zombiemod_phys")) != 0){//create this entity in Hammer ,its a new entity class(can't find in fgd)
get_brush_entity_origin(ent,gphys[ent])//get origin
//entity_set_int(ent,EV_INT_solid, 2)//maybe it's not necessary because its a bursh entity
entity_set_int(ent, EV_INT_movetype, 6)//fall
entity_set_float(ent,EV_FL_takedamage,1.0)//detect shoot
entity_set_float(ent,EV_FL_health,9999.0)//prevent break
entity_set_int(ent, EV_INT_team, zmphys)//its a physic entity
}
|
any idea?
---------------second-----------------
takedamage ( victim, inflictor, attacker, Float:damage, type )
what's the different between inflictor and attacker?