Raised This Month: $ Target: $400
 0% 

Solved Glitched Audio


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-17-2018 , 08:37   Glitched Audio
Reply With Quote #1

I'm emitting sounds to players but they're either not being emitted or glitch the audio.

I have 4 sounds:

#1, doesn't emit.
PHP Code:
public @HamSpawn_Postid )
{
    if( 
is_user_aliveid ) )
    {
        
client_cmdid"spk %s"g_iSoundsLanding_Sound ] );
    }
    return 
HAM_IGNORED;

#2, Glitches the audio, makes a weird un-pleasant noise.
PHP Code:
public @HamThinkInfoTarget_PreiEnt )
{
    if( ! 
pev_validiEnt ) )
    return 
HAM_IGNORED;
    
    new 
szClassName32 ];
    
peviEntpev_classnameszClassNamecharsmaxszClassName ) );

    if( 
equalszClassNameAIRDROP_CLASSNAME ) )
    {
        
set_peviEntpev_nextthinkget_gametime( ) + 0.01 );
        
        if( 
peviEntpev_flags ) & FL_ONGROUND )
        {
            
client_cmd0"spk %s"g_iSoundsAirDrop_Land_Sound ] );
        }
    }
    return 
HAM_IGNORED;

#3, doesn't emit
PHP Code:
public @HamThinkPlayer_Preid )
{
    if( ! 
is_user_aliveid ) )
    return 
HAM_IGNORED;
    
    if( 
g_bIsPlayerInParachuteid ] )
    {
        static 
Float:fVelocity]; 
        
pevidpev_velocityfVelocity ); 
        
        if( 
pevidpev_flags ) & FL_ONGROUND )
        {
            
g_bIsPlayerInParachuteid ] = false;    
            
client_cmdid"spk %s"g_iSoundsLanding_Sound ] );
        }
    }
    return 
HAM_IGNORED;

#4, Works properly
PHP Code:
MakeAirDropEnt( )
{
    
client_cmd0"spk %s"g_iSoundsAirDrop_Appear_Sound ] );

They're all 8 bit 22050 hz mono channel
__________________

Last edited by edon1337; 07-17-2018 at 17:04.
edon1337 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 12:40.


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