This plugin is of kill streaks, when i use this kill streak, throw bombs in the direction of your camera, but when i throw the plane only go to one way, let's call 0, and after i use again this KS and i move my camera 90º and the plane go to the same way of before, the called 0.
PHP Code:
public CreatePlane4(id)
{
new Float:Origin[3], Float:Angle[3], Float:Velocity[3], ent;
get_user_origin(id, PobraneOrigin, 3);
velocity_by_aim(id, 1000, Velocity);
entity_get_vector(id, EV_VEC_origin, Origin);
entity_get_vector(id, EV_VEC_v_angle, Angle);
Angle[0] = Velocity[2] = 0.0;
Origin[2] += 200.0;
ent = create_ent(id, "samolot", "models/avionbueno.mdl", 2, 8, Origin)
entity_set_vector(ent, EV_VEC_velocity, Velocity);
entity_set_vector(ent, EV_VEC_angles, Angle);
emit_sound(ent, CHAN_ITEM, "mw/jet_fly1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
set_task(4.5, "del_plane", ent+5731);
}
public CreateBombs2(taskid)
{
new id = (taskid-997);
numx[id] += 100
new radlocation[3];
PobraneOrigin[0] += numx[id];
PobraneOrigin[1] += -100;
PobraneOrigin[2] += 50;
for(new i=0; i<15; i++)
{
radlocation[0] = PobraneOrigin[0]+1*random_num(-150,150);
radlocation[1] = PobraneOrigin[1]+1*random_num(-150,150);
radlocation[2] = PobraneOrigin[2];
new Float:LocVec[3];
IVecFVec(radlocation, LocVec);
create_ent(id, "bomb", "models/p_hegrenade.mdl", 2, 10, LocVec);
}