Code:
new Float:fOrigin[3], Float:fAngle[3], Float:fVelocity[3]
pev(id, pev_origin, fOrigin)
pev(id, pev_v_angle, fAngle)
new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
entity_set_string(ent, EV_SZ_classname, "ent_name")
entity_set_edict(ent, EV_ENT_owner, id)
entity_set_model(ent, ENT_MODEL)
entity_set_origin(ent, fOrigin)
entity_set_vector(ent, EV_VEC_angles, fAngle)
new Float:MinBox[3] = {-1.0, -1.0, -1.0}
new Float:MaxBox[3] = {1.0, 1.0, 1.0}
entity_set_vector(ent, EV_VEC_mins, MinBox)
entity_set_vector(ent, EV_VEC_maxs, MaxBox)
entity_set_int(ent, EV_INT_solid, SOLID_BBOX)
entity_set_int(ent, EV_INT_movetype, MOVETYPE_FLY)
entity_set_edict(ent, EV_ENT_owner, id)
VelocityByAim(id, 2500, fVelocity)
entity_set_vector(ent, EV_VEC_velocity, fVelocity)
This is from one of my plugins. Works nice.