#include <amxmodx>
new const sounds_tt[][] =
{
"misc/roundsound/1.mp3",
"misc/roundsound/2.mp3",
"misc/roundsound/3.mp3",
"misc/roundsound/4.mp3",
"misc/roundsound/5.mp3"
"misc/roundsound/6.mp3"
"misc/roundsound/7.mp3"
"misc/roundsound/8.mp3"
"misc/roundsound/9.mp3"
"misc/roundsound/10.mp3"
"misc/roundsound/11.mp3"
"misc/roundsound/12.mp3"
"misc/roundsound/13.mp3"
}
new const sounds_ct[][] =
{
"misc/roundsound/1.mp3",
"misc/roundsound/2.mp3",
"misc/roundsound/3.mp3",
"misc/roundsound/4.mp3",
"misc/roundsound/5.mp3",
"misc/roundsound/6.mp3"
"misc/roundsound/7.mp3"
"misc/roundsound/8.mp3"
"misc/roundsound/9.mp3"
"misc/roundsound/10.mp3"
"misc/roundsound/11.mp3"
"misc/roundsound/12.mp3"
"misc/roundsound/13.mp3"
}
public plugin_precache()
{
for (new i = 0; i < sizeof sounds_tt; i++)
precache_sound(sounds_tt[i])
for (new i = 0; i < sizeof sounds_ct; i++)
precache_sound(sounds_ct[i])
}
public plugin_init()
{
register_plugin("RoundSound","1.0","KaMaZZ")
register_event("SendAudio", "tt_win", "a", "2&%!MRAD_terwin")
register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")
}
public tt_win()
{
client_cmd(0,"stopsound")
play_sound(0, sounds_tt[random_num(0, sizeof sounds_tt - 1)])
return PLUGIN_CONTINUE
}
public ct_win()
{
client_cmd(0,"stopsound")
play_sound(0, sounds_ct[random_num(0, sizeof sounds_ct - 1)])
return PLUGIN_CONTINUE
}
stock play_sound(index, const dzwiek[])
{
if(contain(dzwiek, ".mp3") != -1)
{
new soundform[64]
format(soundform, 63, "sound/%s", dzwiek)
client_cmd(index, "mp3 play %s", soundform)
}
else
client_cmd(index, "spk %s", dzwiek)
}
dlaczego nie moge tego skompilowac?
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse

Prosze o kompliacje i poprawe pod rs
Temat rozp. lubiekeppa, 03.04.2012 20:05
2 odpowiedzi w tym temacie
#1
Napisano 03.04.2012 20:05
#2
Napisano 03.04.2012 21:19
Automatyczna wiadomość
Ten temat został przeniesiony z forum:
AMX Mod X > Problemy z pluginami
do
Scripting AMXX > Prośby o kompilacje pluginów / Problemy z kompilacją
#3
Napisano 07.04.2012 13:26
przecinków się zapomniało
#include <amxmodx>
new const sounds_tt[][] =
{
"misc/roundsound/1.mp3",
"misc/roundsound/2.mp3",
"misc/roundsound/3.mp3",
"misc/roundsound/4.mp3",
"misc/roundsound/5.mp3",
"misc/roundsound/6.mp3",
"misc/roundsound/7.mp3",
"misc/roundsound/8.mp3",
"misc/roundsound/9.mp3",
"misc/roundsound/10.mp3",
"misc/roundsound/11.mp3",
"misc/roundsound/12.mp3",
"misc/roundsound/13.mp3"
}
new const sounds_ct[][] =
{
"misc/roundsound/1.mp3",
"misc/roundsound/2.mp3",
"misc/roundsound/3.mp3",
"misc/roundsound/4.mp3",
"misc/roundsound/5.mp3",
"misc/roundsound/6.mp3",
"misc/roundsound/7.mp3",
"misc/roundsound/8.mp3",
"misc/roundsound/9.mp3",
"misc/roundsound/10.mp3",
"misc/roundsound/11.mp3",
"misc/roundsound/12.mp3",
"misc/roundsound/13.mp3"
}
public plugin_precache()
{
for (new i = 0; i < sizeof sounds_tt; i++)
precache_sound(sounds_tt[i])
for (new i = 0; i < sizeof sounds_ct; i++)
precache_sound(sounds_ct[i])
}
public plugin_init()
{
register_plugin("RoundSound","1.0","KaMaZZ")
register_event("SendAudio", "tt_win", "a", "2&%!MRAD_terwin")
register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")
}
public tt_win()
{
client_cmd(0,"stopsound")
play_sound(0, sounds_tt[random_num(0, sizeof sounds_tt - 1)])
return PLUGIN_CONTINUE
}
public ct_win()
{
client_cmd(0,"stopsound")
play_sound(0, sounds_ct[random_num(0, sizeof sounds_ct - 1)])
return PLUGIN_CONTINUE
}
stock play_sound(index, const dzwiek[])
{
if(contain(dzwiek, ".mp3") != -1)
{
new soundform[64]
format(soundform, 63, "sound/%s", dzwiek)
client_cmd(index, "mp3 play %s", soundform)
}
else
client_cmd(index, "spk %s", dzwiek)
}
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych