Raised This Month: $ Target: $400
 0% 

Play sound.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 10-27-2011 , 08:34   Re: Play sound.
Reply With Quote #4

Funcwiki explains it very well.

Example:

Code:
// syntax // player index, channel, sound, volume, attenuation value, flags, pitch value emit_sound( index, channel, sample[ ], Float:vol, Float:att, flags, pitch ); // to a player with index "id" emit_sound( id, CHAN_STATIC, "your sound here", 0.35, ATTN_NORM, 0, PITCH_NORM ); // to everyone emit_sound( 0, CHAN_STATIC, "your sound here", 0.35, ATTN_NORM, 0, PITCH_NORM );

Code:
/* Constants for emit_sound() */ /* Channels */ #define CHAN_AUTO    0 #define CHAN_WEAPON  1 #define CHAN_VOICE   2 #define CHAN_ITEM    3 #define CHAN_BODY    4 #define CHAN_STREAM  5  /* allocate stream channel from the static or dynamic area */ #define CHAN_STATIC  6  /* allocate channel from the static area */ #define CHAN_NETWORKVOICE_BASE  7   /* voice data coming across the network */ #define CHAN_NETWORKVOICE_END   500 /* network voice data reserves slots (CHAN_NETWORKVOICE_BASE through CHAN_NETWORKVOICE_END). */ /* Attenuation values */ #define ATTN_NONE    0.00 #define ATTN_NORM    0.80 #define ATTN_IDLE    2.00 #define ATTN_STATIC  1.25 /* Pitch values */ #define PITCH_NORM   100    /* non-pitch shifted */ #define PITCH_LOW    95 /* other values are possible - 0-255, where 255 is very high */ #define PITCH_HIGH   120 /* Volume values */ #define VOL_NORM     1.0
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
 



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 14:20.


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