http://forums.alliedmods.net/showthread.php?p=213777
Jetpack Lite is more simplified.
PHP Code:
public client_PreThink(id) {
if( !is_user_alive(id)) {
return PLUGIN_CONTINUE;
}
if(!(get_user_button(id) & IN_JUMP)) {
return PLUGIN_CONTINUE;
}
new Float:fAim[3] , Float:fVelocity[3];
VelocityByAim(id , 500 , fAim);
fVelocity[0] = fAim[0];
fVelocity[1] = fAim[1];
fVelocity[2] = fAim[2];
set_user_velocity(id , fVelocity);
entity_set_int(id , EV_INT_gaitsequence , 6);
emit_sound(id , CHAN_VOICE , JP_SOUND , 1.0 , ATTN_NORM , 0 , PITCH_NORM);
if(frame[id] >= 3) {
frame[id] = 0;
smoke_effect(id);
entity_set_string(id , EV_SZ_weaponmodel , "models/p_egon.mdl");
}
frame[id]++;
return PLUGIN_CONTINUE;
}