AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   sound help (https://forums.alliedmods.net/showthread.php?t=229968)

hosimosi 11-17-2013 16:10

sound help
 
hey
i try to add mp3 sound for plugin but none of mp3 files works
Can anyone fix it or say whats the problem?

PHP Code:

PrecacheSounds() 
{
    new 
configDir[128]
    
get_configsdir(configDir,127)
    
formatex(FileSounds,255,"%s/Sj-Pro/pro-sounds.ini",configDir)
    
    new 
SoundNames[128]
    new 
prefijo[4], sufijo[26], Data[128], len
    
for(new 0MAX_LINE_MODELSx++)
    {
        
read_file(FileSoundsxData127len)
        
parse(Dataprefijo3sufijo25)
        if(
equali(prefijo,"##"))
        {
            for(new 
110y++)
            {
                
read_file(FileSoundsyData127len)
                if(
equali(Data,""))                
                    continue
                    
                
1
                
break;
            }                
            
            
parse(DataSoundNames127)
            
            if(
equali(sufijo,GOL1))
                
formatex(SoundDirect[0], 255"Sj-Pro/%s.mp3"SoundNames)    
            else if(
equali(sufijo,GOL2))
                
formatex(SoundDirect[1], 255"Sj-Pro/%s.mp3"SoundNames)    
            else if(
equali(sufijo,GOL3))
                
formatex(SoundDirect[2], 255"Sj-Pro/%s.mp3"SoundNames)    
            else if(
equali(sufijo,GOL4))
                
formatex(SoundDirect[3], 255"Sj-Pro/%s.mp3"SoundNames)    
            else if(
equali(sufijo,GOL5))
                
formatex(SoundDirect[4], 255"Sj-Pro/%s.mp3"SoundNames)    
            else if(
equali(sufijo,GOL6))
                
formatex(SoundDirect[5], 255"Sj-Pro/%s.mp3"SoundNames)
        } 

and

PHP Code:

if(score[team] < get_pcvar_num(CVAR_SCORE)) {
            new 
random_num(0,5)
            
client_cmd(0"mp3 play ^"Sj-Pro/%s^""SoundDirect[r]); 

thanks!


All times are GMT -4. The time now is 23:18.

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