Raised This Month: $ Target: $400
 0% 

Sound not played


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
pewex
Senior Member
Join Date: Dec 2010
Location: AlliedMods
Old 12-30-2012 , 14:34   Sound not played
Reply With Quote #1

Hello, sound download, not played ambience random one round:

sma:

Code:
#include <amxmodx>

new const AmbienSound[] = "misc/sds.mp3";

#define POSSIBLE_ROUND_NUM_PER_MAP 50

new i
new g_iPlayed

public plugin_precache () 
{
    precache_sound( AmbienSound );
}

public plugin_init () 
{
    register_plugin( "Ambience Sound", "0.1",  "DeeKeiD" );
    register_logevent( "OnRoundStart", 2, "1=Round_Start" );
    
    i = random_num(1, POSSIBLE_ROUND_NUM_PER_MAP)
}

public OnRoundStart()
{    
    static i2
    if(!g_iPlayed)
    {
        ++i2
        if(i2 == i)
        {
            g_iPlayed = 1
            client_cmd( 0, "mp3 play %s", AmbienSound );
        }
    }
}
Please hellp
pewex is offline
 


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 13:27.


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