1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104. | /* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fakemeta>
#include <xs>
#include <engine>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
static const mrocket[] = "models/rpgrocket.mdl";
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("stozek", "test");
}
public plugin_precache()
{
precache_model(mrocket);
}
public test(id){
const Float:fSpeed = 700.0;
new Float:fAngles[3];
pev(id,pev_angles,fAngles)
new Float:fVeloc[3][3],Float:fTmp[3],Float:fForward[3];
angle_vector(fAngles,ANGLEVECTOR_FORWARD,fForward);
xs_vec_normalize(fForward,fForward);
xs_vec_mul_scalar(fForward,fSpeed,fForward);
xs_vec_copy(fVeloc[1],fForward);
xs_vec_normalize(fForward,fForward);
angle_vector(fAngles,ANGLEVECTOR_RIGHT,fTmp);
xs_vec_normalize(fTmp,fTmp)
for(new i = 0;i<3;i++){
fTmp[i] = fForward[i] + ( fTmp[i] * floatsin(30.0,degrees) )
}
xs_vec_normalize(fTmp,fTmp);
xs_vec_mul_scalar(fTmp,fSpeed,fTmp)
xs_vec_copy(fVeloc[0],fTmp);
angle_vector(fAngles,ANGLEVECTOR_RIGHT,fTmp);
xs_vec_neg(fTmp,fTmp);
xs_vec_normalize(fTmp,fTmp)
for(new i = 0;i<3;i++){
fTmp[i] = fForward[i] + ( fTmp[i] * floatsin(30.0,degrees) )
}
xs_vec_normalize(fTmp,fTmp);
xs_vec_mul_scalar(fTmp,fSpeed,fTmp)
xs_vec_copy(fVeloc[2],fTmp);
for(new i = 0; i < 3; i++)
MakeEnt(id, fVeloc[i]);
}
public MakeEnt(id, Float:fVeloc[3])
{
if(is_user_alive(id))
{
new Float: Origin[3], Float: vAngle[3], Float:vAngles[3];
entity_get_vector(id, EV_VEC_v_angle, vAngle);
entity_get_vector(id, EV_VEC_origin , Origin);
entity_get_vector(id, EV_VEC_angles , vAngles);
new Ent = create_entity("info_target");
entity_set_string(Ent, EV_SZ_classname, "zielonek");
entity_set_model(Ent, mrocket);
entity_set_origin(Ent, Origin);
entity_set_vector(Ent, EV_VEC_angles, vAngle);
Origin[2] += 8.0
vAngle[0] *= -1.0;
entity_set_origin(Ent, Origin);
entity_set_vector(Ent, EV_VEC_v_angle, vAngle);
entity_set_vector(Ent, EV_VEC_angles , vAngles);
entity_set_int(Ent, EV_INT_solid, SOLID_BBOX);
entity_set_int(Ent, EV_INT_movetype, MOVETYPE_FLY);
entity_set_int(Ent, EV_INT_rendermode, kRenderTransAdd);
entity_set_float(Ent, EV_FL_scale, 1.20);
entity_set_float(Ent, EV_FL_renderamt, 255.0);
entity_set_int(Ent, EV_INT_effects, 64);
entity_set_edict(Ent, EV_ENT_owner, id);
new Float:maxs[3] = {-15.0, -15.0, -15.0}
new Float:mins[3] = {15.0, 15.0, 15.0}
entity_set_size(Ent,maxs, mins)
VelocityByAim(id, 1000 , fVeloc);
entity_set_vector(Ent, EV_VEC_velocity , fVeloc);
}
} |