AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [REQ] Parachute Sound (https://forums.alliedmods.net/showthread.php?t=301373)

khashayar007 09-18-2017 11:16

[REQ] Parachute Sound
 
1 Attachment(s)
Hi. I want to play a wav file when a player opens a parachute.

Napoleon_be 09-19-2017 07:19

Re: [REQ] Parachute Sound
 
Attach the file you want to be played

khashayar007 09-19-2017 10:21

Re: [REQ] Parachute Sound
 
1 Attachment(s)
Here you are

tarsisd2 09-19-2017 11:59

Re: [REQ] Parachute Sound
 
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

khashayar007 09-19-2017 12:31

Re: [REQ] Parachute Sound
 
Thanks its working but first it has a noise sound then the parachute sound plays


All times are GMT -4. The time now is 09:23.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.