Hi all.
I'm trying to make an entity to follow me. But the entity doesn't appears.
Here's the code:
PHP Code:
#include <amxmodx>
#include <engine>
#include <hamsandwich>
new szMdl[] = "models/TEST.mdl";
public plugin_init() register_clcmd("say /test", "Func");
public plugin_precache() precache_model(szMdl);
public Func(id)
{
new ent = create_entity("info_target");
ExecuteHam(Ham_CS_RoundRespawn, ent);
entity_set_string(ent, EV_SZ_classname, "classname");
new Float:fVecOrigin[3];
entity_get_vector(id, EV_VEC_origin, fVecOrigin);
entity_set_vector(ent, EV_VEC_origin, fVecOrigin);
// entity_set_origin(ent, fVecOrigin);
entity_set_float(ent, EV_FL_takedamage, 25.0); // Also can someone tell me what is this for
// I saw it in the NPC tutorial but I don't know what is it for
entity_set_float(ent, EV_FL_health, 250.0);
entity_set_size(ent, Float:{0.0, 0.0, 0.0}, Float:{50.0, 50.0, 50.0});
entity_set_int(ent, EV_INT_solid, SOLID_NOT);
entity_set_model(ent, szMdl);
entity_set_int(ent, EV_INT_movetype, MOVETYPE_FOLLOW);
entity_set_edict(ent, EV_ENT_aiment, id);
entity_set_int(ent, EV_INT_renderfx, kRenderFxGlowShell);
entity_set_int(ent, EV_INT_rendermode, kRenderTransAlpha);
entity_set_float(ent, EV_FL_renderamt, 50.0);
entity_set_vector(ent, EV_VEC_rendercolor, Float:{0.0, 200.0, 10.0});
entity_set_float(ent, EV_FL_animtime, 2.0)
entity_set_float(ent, EV_FL_framerate, 1.0)
entity_set_int(ent, EV_INT_sequence, 0);
}