PHP Code:
public fire_rocket(id) {
new Float:StartOrigin[3], Float:Angle[3], Float:targetv[3]
new PlayerOrigin[3]
get_user_origin(id, PlayerOrigin, 1)
StartOrigin[0] = float(PlayerOrigin[0])
StartOrigin[1] = float(PlayerOrigin[1])
StartOrigin[2] = float(PlayerOrigin[2]+300)
Angle[0] = float(4500.0)
Angle[1] = float(0)
Angle[2] = float(0)
targetv[0] = float(0)
targetv[1] = float(0)
targetv[2] = float(-4500)
new RocketEnt = create_entity("info_target")
entity_set_string(RocketEnt, EV_SZ_classname, "rpgrocket")
entity_set_model(RocketEnt, "models/rpgrocket.mdl")
entity_set_origin(RocketEnt, StartOrigin)
entity_set_vector( RocketEnt, EV_VEC_angles, targetv )
new Float:MinBox[3] = {-1.0, -1.0, -1.0}
new Float:MaxBox[3] = {1.0, 1.0, 1.0}
entity_set_vector(RocketEnt, EV_VEC_mins, MinBox)
entity_set_vector(RocketEnt, EV_VEC_maxs, MaxBox)
entity_set_int(RocketEnt, EV_INT_solid, 2)
entity_set_int(RocketEnt, EV_INT_movetype, 9)
entity_set_edict(RocketEnt, EV_ENT_owner, id)
set_pev(RocketEnt, pev_effects, EF_LIGHT)
entity_set_vector(RocketEnt, EV_VEC_velocity, targetv)
emit_sound(RocketEnt, CHAN_WEAPON, "weapons/rocketfire1.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
}
Ok after some time i rip off some plug-in i done this, its shouts projectile rocket down.
What is maximum high?
PHP Code:
StartOrigin[2] = float(PlayerOrigin[2]+300)
Still missing, explosion , smoke trail and area damage!