new PL[] = "[MG] Parachute"
new AU[] = "Remake Nikron"
precache_model("models/parachute.mdl")
register_plugin(PL, VE, AU)
public client_connect(id)
g_bParashute[id] = false;
entity_set_float(id, EV_FL_gravity, 1.0);
public client_PreThink(id)
if(!is_user_alive(id)) return;
new Float:fallspeed = 100 * -1.0;
if(g_bParashute[id] && get_entity_flags(id) & FL_ONGROUND)
entity_set_float(id, EV_FL_gravity, 1.0);
g_bParashute[id] = false;
if(get_user_button(id) & IN_USE)
get_user_velocity(id, velocity);
entity_set_int(id, EV_INT_sequence, 3);
entity_set_int(id, EV_INT_gaitsequence, 1);
entity_set_float(id, EV_FL_frame, 1.0);
entity_set_float(id, EV_FL_framerate, 1.0);
entity_set_float(id, EV_FL_gravity, 0.1);
velocity[2] = (velocity[2] + 40.0 < fallspeed) ? velocity[2] + 40.0 : fallspeed;
set_user_velocity(id, velocity);
set_user_rendering(id,kRenderFxGlowShell,random_num(0,255),random_num(0,255),random_num(0,255),kRenderNormal,25)
else if(g_bParashute[id])
entity_set_float(id, EV_FL_gravity, 1.0);
g_bParashute[id] = false;
else if(get_user_oldbutton(id) & IN_USE)
entity_set_float(id, EV_FL_gravity, 1.0);
g_bParashute[id] = false;
message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(99); // TE_KILLBEAM
entity_get_vector(id, EV_VEC_velocity, velocity)
para_ent[id] = create_entity("info_target")
entity_set_string(para_ent[id],EV_SZ_classname,"parachute")
entity_set_edict(para_ent[id], EV_ENT_aiment, id)
entity_set_edict(para_ent[id], EV_ENT_owner, id)
entity_set_int(para_ent[id], EV_INT_movetype, MOVETYPE_FOLLOW)
entity_set_model(para_ent[id], "models/parachute.mdl")
entity_set_int(para_ent[id], EV_INT_sequence, 0)
entity_set_int(para_ent[id], EV_INT_gaitsequence, 1)
entity_set_float(para_ent[id], EV_FL_frame, 0.0)
entity_set_float(para_ent[id], EV_FL_fuser1, 0.0)
set_rendering (para_ent[id],kRenderFxNone,255,255,255,kRenderNormal,25);
remove_entity(para_ent[id])
set_user_rendering(id, kRenderFxGlowShell,0,0,0,kRenderNormal,25)