Raised This Month: $12 Target: $400
 3% 

[REQ] Parachute Sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
khashayar007
Senior Member
Join Date: Jan 2015
Location: Macedonia
Old 09-18-2017 , 11:16   [REQ] Parachute Sound
Reply With Quote #1

Hi. I want to play a wav file when a player opens a parachute.
Attached Files
File Type: sma Get Plugin or Get Source (amx_parachute.sma - 525 views - 13.4 KB)
khashayar007 is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 09-19-2017 , 07:19   Re: [REQ] Parachute Sound
Reply With Quote #2

Attach the file you want to be played
__________________

Last edited by Napoleon_be; 09-19-2017 at 07:59.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
khashayar007
Senior Member
Join Date: Jan 2015
Location: Macedonia
Old 09-19-2017 , 10:21   Re: [REQ] Parachute Sound
Reply With Quote #3

Here you are
Attached Files
File Type: zip parachute.zip (14.9 KB, 70 views)
khashayar007 is offline
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
khashayar007
Senior Member
Join Date: Jan 2015
Location: Macedonia
Old 09-19-2017 , 12:31   Re: [REQ] Parachute Sound
Reply With Quote #5

Thanks its working but first it has a noise sound then the parachute sound plays
khashayar007 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:47.


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