I wanna do this Entity Direction, i need register think by the classname of the entity too.
PHP Code:
public @ShootEnergyBalls(Client)
{
new KiBlasts = create_entity("env_sprite");
new Float:StartOrigin[3], Float:Angle[3];
new PlayerOrigin[3];
get_user_origin(Client, PlayerOrigin, 1);
StartOrigin[0] = float(PlayerOrigin[0]);
StartOrigin[1] = float(PlayerOrigin[1]);
StartOrigin[2] = float(PlayerOrigin[2]);
entity_get_vector(Client, EV_VEC_v_angle, Angle);
Angle[0] = Angle[0] * -1.0;
entity_set_int(KiBlasts, EV_INT_rendermode, kRenderTransAdd);
entity_set_float(KiBlasts, EV_FL_renderamt, 250.0);
entity_set_string(KiBlasts, EV_SZ_classname, "beamattack");
entity_set_model(KiBlasts, WEAPON_SPRITE_HEAD);
entity_set_origin(KiBlasts, StartOrigin);
entity_set_vector(KiBlasts, EV_VEC_angles, Angle);
entity_set_float(KiBlasts, EV_FL_scale, 0.99);
new Float:MinBox[3] = {-1.0, -1.0, -1.0};
new Float:MaxBox[3] = {1.0, 1.0, 1.0};
entity_set_vector(KiBlasts, EV_VEC_mins, MinBox);
entity_set_vector(KiBlasts, EV_VEC_maxs, MaxBox);
entity_set_int(KiBlasts, EV_INT_solid, SOLID_TRIGGER);
entity_set_int(KiBlasts, EV_INT_movetype, MOVETYPE_FLY);
entity_set_edict(KiBlasts, EV_ENT_owner, Client);
new Float:Velocity[3];
VelocityByAim(Client, 2600, Velocity);
entity_set_vector(KiBlasts, EV_VEC_velocity, Velocity);
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
{
write_byte(TE_BEAMFOLLOW);
write_short(KiBlasts);
write_short(WEAPON_SPRITE_TRAIL);
write_byte(9999);
write_byte(10);
write_byte(255);
write_byte(255);
write_byte(255);
write_byte(255);
}
message_end();
}
This is my Entity
https://www.youtube.com/watch?v=8DbsexDiotg
The entity Blue is the direction to i wanna do, the entity yellow is my entity help me please.