Raised This Month: $ Target: $400
 0% 

playing sound does not work


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
proffs
Senior Member
Join Date: Jul 2013
Old 05-24-2014 , 13:15   playing sound does not work
Reply With Quote #1

I have this on my BM but it wont play or preache any sound file.


PHP Code:
new g_sound_music[][] =
{      
        
"sound/misc/sg1.mp3",
        
"sound/misc/sg2.mp3",
        
"sound/misc/sg3.mp3",
        
"sound/misc/sg4.mp3",
        
"sound/misc/sg5.mp3"
 
};

new 
bool:g_BlockMusic;


public 
plugin_precache()
{

        for(new 
i=0i<sizeof(g_sound_music); i++)
        {
                
precache_generic(g_sound_music[i]);
        }
}



public 
ActionMusic()
{
        if(!
g_BlockMusic)
        {
                new 
rand random(sizeof(g_sound_music));
                new 
command[128];
                
format(commandcharsmax(command), "mp3 play %s"g_sound_music[rand]);
                new 
iPlayers[32], iNum;
                
get_players(iPlayersiNum);
                for(new 
i=0;i<=iNum;i++)
                {
                        new 
id iPlayers[i];
                        if(
is_user_connected(id))
                        {
                                
client_cmd(idcommand);
                        }
                }
                
g_BlockMusic true;
                
set_task(40.0"AllowMusic");
        }
}
 
public 
AllowMusic()
{
        
g_BlockMusic true;


Last edited by proffs; 05-24-2014 at 13:16.
proffs 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 09:37.


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