View Single Post
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 09-19-2017 , 11:59   Re: [REQ] Parachute Sound
Reply With Quote #4

in plugin precache add

PHP Code:
public plugin_precache()
{
    
precache_sound("misc/parachute.wav"
in public client_PreThink(id)
after this

PHP Code:
                if (para_ent[id] > 0
            {
                
                
entity_set_int(idEV_INT_sequence3)
                
entity_set_int(idEV_INT_gaitsequence1)
                
entity_set_float(idEV_FL_frame1.0)
                
entity_set_float(idEV_FL_framerate1.0)
                
set_user_gravity(id0.1)

                
velocity[2] = (velocity[2] + 40.0 fallspeed) ? velocity[2] + 40.0 fallspeed
                entity_set_vector
(idEV_VEC_velocityvelocity)

                if (
entity_get_int(para_ent[id],EV_INT_sequence) == 0
                { 
add this

PHP Code:
                    emit_sound(idCHAN_WEAPON"misc/parachute.wav"0.5ATTN_NORM0PITCH_NORM
and after this bit

PHP Code:
    else if ((oldbutton IN_USE) && para_ent[id] > 
    { 
add this

PHP Code:
        emit_sound(idCHAN_WEAPON"misc/parachute"0.5ATTN_NORM1<<5PITCH_NORM
this is an example, but it should work
tarsisd2 is offline