Dzisiaj przeszedłem z roundsound1 do roundsound2 ze względu na wygodę (dzwieki w pliku ini).
Problem w tym, że to nie działa! Testowałem na servie domowym, tylko ten jeden plugin zainstalowany i podboty i działa, a przy takiej liście pluginów:
c4_sound.amxx amx_roundsound.amxx ultimate_sounds_PL.amxx descriptive_fire_in_the_hole_PL.amxx noz_speed.amxx bombsite.amxx ad_manager.amxx colored_flashbangs.amxx nobombscore.amxx afkbomb.amxx auto_restart_knives.amxx spawnprotection.amxx advanced_slowmo.amxx say_motd.amxx admin_freelook.amxx flashbang.amxx amx_plant_bonus.amxx join_leave.amxx sxe.amxx
nie chce działać.
To ten plugin:
#include <amxmodx>
#include <amxmisc>
new gFiles[300][128]
new gCount=0
public plugin_init()
{
register_plugin("RoundSound","2.0","PaintLancer")
register_event("SendAudio", "win", "a", "2&%!MRAD_terwin")
register_event("SendAudio", "win", "a", "2&%!MRAD_ctwin")
}
public win()
{
if(gCount>0)
{
new rand = random_num(0,gCount-1)
client_cmd(0,"stopsound")
play_any_sound(gFiles[rand])
}
return PLUGIN_HANDLED
}
public plugin_precache()
{
new rsFile[128],s[128],i
get_configsdir(rsFile,128)
add(rsFile,128,"/roundsound.ini")
i=fopen(rsFile,"rt")
gCount=0
if(i==0){
set_hudmessage(255, 0, 0, -1.0, 0.89, 0, 2.0, 20.0,0.1,0.1,-1)
show_hudmessage(0,"Error rs loading config file!")
} else {
while (!feof(i)) // Reading rs config from roundsound.ini
{
fgets(i,s,128)
if (s[strlen(s)-1] == '^n')
{
s[strlen(s)-1] = 0
}
copy(gFiles[gCount],128,s)
gCount++
}
fclose(i)
}
for(i=0;i<gCount;i++)
{
format(s,128,"sound/misc/%s",gFiles[i])
precache_generic(s)
}
return PLUGIN_CONTINUE
}
public play_any_sound(sound[])
{
new is_mpeg = ( containi(sound, ".mp") != -1 )
if ( is_mpeg )
client_cmd(0, "mp3 play ^"sound/misc/%s^"", sound)
else
client_cmd(0, "spk ^"%s^"", sound)
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{ rtf1 ansi deff0{ fonttbl{ f0 fnil Tahoma;}}n viewkind4 uc1 pard lang1045 f0 fs16 n par }
*/
A tu mój plik roundsound.ini
12495/win/1.mp3 12495/win/2d.mp3 12495/win/3.mp3 12495/win/4b.mp3 12495/win/5b.mp3 12495/win/6.mp3 12495/win/7b.mp3 12495/win/8b.mp3 12495/win/9.mp3 12495/win/10d.mp3 12495/win/11.mp3 12495/win/12.mp3 12495/win/13.mp3 12495/win/14.mp3
Pliki są na servie, ponieważ się pobierały.
pozdrawiam.


Dodatki SourceMod



Temat jest zamknięty









