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 x = 0; x < MAX_LINE_MODELS; x++)
{
read_file(FileSounds, x, Data, 127, len)
parse(Data, prefijo, 3, sufijo, 25)
if(equali(prefijo,"##"))
{
for(new y = x + 1; y < x + 10; y++)
{
read_file(FileSounds, y, Data, 127, len)
if(equali(Data,""))
continue
x = y - 1
break;
}
parse(Data, SoundNames, 127)
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 r = random_num(0,5)
client_cmd(0, "mp3 play ^"Sj-Pro/%s^"", SoundDirect[r]);
thanks!