you could of done it easily by looking over the lasermine, jetpack or supply box code... that is the way i've learnt how to deal with entities...
all you had to do is copy paste the entity creation and touch functions, then edit them a little...
anyway, here you have an example ( sorry, i didn't have time to finish it, but im sure you can do it yourself )
this way, may i ask if the public Event_NewRound is correct? i mean it works, but in some cases i seen looping to get the entities removed
Code:
#define ClassUC "uclip"
public plugin_init()
{
register_touch(ClassUC, "player", "Touch")
}
public Event_NewRound()
{
remove_entity_name(ClassUC)
}
public Create_Entity(id)
{
new ent = create_entity("info_target")
if(!is_valid_ent(ent)) return;
new Float:Aim[3], Float:Origin[3]
velocity_by_aim(id, 32, Aim)
entity_get_vector(id, EV_VEC_origin, Origin)
Origin[0] += 2*Aim[0]
Origin[1] += 2*Aim[1]
entity_set_string(ent, EV_SZ_classname, ClassUC)
entity_set_model(ent, ModelJetpack_W)
entity_set_int(ent, EV_INT_movetype, MOVETYPE_TOSS)
entity_set_int(ent, EV_INT_solid, SOLID_TRIGGER)
entity_set_size(ent, Float:{-8.0, -8.0, -8.0}, Float:{8.0, 8.0, 8.0})
entity_set_float(ent, EV_FL_gravity, 1.25)
entity_set_vector(ent, EV_VEC_origin, Origin)
velocity_by_aim(id, 400, Aim)
entity_set_vector(ent, EV_VEC_velocity, Aim)
}
public Touch(ent, id)
{
if(is_valid_ent(ent) && is_user_connected(id))
{
if(!is_user_alive(id)) return PLUGIN_HANDLED;
entity_set_int(ent, EV_INT_solid, SOLID_NOT)
remove_entity(ent)
}
return PLUGIN_CONTINUE;
}