edytowałem sobie plugin
Spoiler
#include
#include
new const PLUGIN[] = "Ewelinka Sounds"
new const VERSION[] = "1.0"
new const AUTHOR[] = "stupok69"
new const g_sounds[][] =
{
"misc/elo.wav",
"misc/siema.wav",
"misc/siemano.wav",
"misc/czesc.wav",
"misc/cze.wav",
"misc/hej.wav",
"misc/heja.wav",
"misc/yo.wav"
}
new g_maxplayers
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say elo", "say_elo_handle")
register_clcmd("say siema", "say_siema_handle")
register_clcmd("say siemano", "say_siemano_handle")
register_clcmd("say czesc", "say_czesc_handle")
register_clcmd("say cze", "say_cze_handle")
register_clcmd("say hej", "say_hej_handle")
register_clcmd("say heja", "say_heja_handle")
register_clcmd("say yo", "say_yo_handle")
g_maxplayers = get_maxplayers() + 1
}
public say_elo_handle(id)
{
play_sound(id, 0)
}
public say_siema_handle(id)
{
play_sound(id, 1)
}
public say_siemano_handle(id)
{
play_sound(id, 2)
}
public say_czesc_handle(id)
{
play_sound(id, 3)
}
public say_cze_handle(id)
{
play_sound(id, 4)
}
public say_hej_handle(id)
{
play_sound(id, 5)
}
public say_heja_handle(id)
{
play_sound(id, 6)
}
public say_yo_handle(id)
{
play_sound(id, 7)
}
public play_sound(id, soundid)
{
static buffer[64]
format(buffer, 63, "sound/%s", g_sounds[soundid])
if(is_user_alive(id))
{
for(new i = 0; i < g_maxplayers; i++)
{
if(is_user_connected(i))
{
console_cmd(id, "spk %s", buffer)
}
}
}
else
{
for(new i = 0; i < g_maxplayers; i++)
{
if(is_user_connected(i) && !is_user_alive(i))
{
console_cmd(id, "spk %s", buffer)
}
}
}
return PLUGIN_HANDLED
}
tylko mam problem bo wchodząc na serwer nie pobiera dźwięków i jak je dodam sobie ręcznie też ich nie odgrywa
Przed edycja wygadał tak
Spoiler
#include
#include
new const PLUGIN[] = "Ewelinka Sounds"
new const VERSION[] = "1.0"
new const AUTHOR[] = "stupok69"
new const g_sounds[][] =
{
"misc/elo.wav",
"misc/siema.wav",
"misc/siemano.wav"
}
new const g_teamattack_sounds[][] =
{
"misc/tk1.wav",
"misc/tk2.wav",
"misc/tk3.wav",
"misc/tk4.wav"
}
new g_maxplayers
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say elo", "say_elo_handle")
register_clcmd("say siema", "say_siema_handle")
register_clcmd("say siemano", "say_siemano_handle")
g_maxplayers = get_maxplayers() + 1
}
public plugin_precache()
{
for(new i = 0; i < sizeof g_sounds; i++)
{
if(!precache_sound(g_sounds[i]))
{
log_amx("* Error: Could not precache (%s), plugin stopped.", g_sounds[i])
pause("ad")
}
}
for(new i = 0; i < sizeof g_teamattack_sounds; i++)
{
if(!precache_sound(g_teamattack_sounds[i]))
{
log_amx("* Error: Could not precache (%s), plugin stopped.", g_teamattack_sounds[i])
pause("ad")
}
}
}
public say_elo_handle(id)
{
play_sound(id, 0)
}
public say_siema_handle(id)
{
play_sound(id, 1)
}
public say_siemano_handle(id)
{
play_sound(id, 2)
}
public play_sound(id, soundid)
{
static buffer[64]
format(buffer, 63, "sound/%s", g_sounds[soundid])
if(is_user_alive(id))
{
for(new i = 0; i < g_maxplayers; i++)
{
if(is_user_connected(i))
{
console_cmd(id, "spk %s", buffer)
}
}
}
else
{
for(new i = 0; i < g_maxplayers; i++)
{
if(is_user_connected(i) && !is_user_alive(i))
{
console_cmd(id, "spk %s", buffer)
}
}
}
return PLUGIN_HANDLED
}
public client_damage(attacker, victim, damage, wpnindex, hitplace, TA)
{
if(TA)
{
emit_sound(victim, CHAN_VOICE, g_teamattack_sounds[random_num(0, sizeof g_teamattack_sounds - 1)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
}
}
#include
new const PLUGIN[] = "Ewelinka Sounds"
new const VERSION[] = "1.0"
new const AUTHOR[] = "stupok69"
new const g_sounds[][] =
{
"misc/elo.wav",
"misc/siema.wav",
"misc/siemano.wav"
}
new const g_teamattack_sounds[][] =
{
"misc/tk1.wav",
"misc/tk2.wav",
"misc/tk3.wav",
"misc/tk4.wav"
}
new g_maxplayers
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say elo", "say_elo_handle")
register_clcmd("say siema", "say_siema_handle")
register_clcmd("say siemano", "say_siemano_handle")
g_maxplayers = get_maxplayers() + 1
}
public plugin_precache()
{
for(new i = 0; i < sizeof g_sounds; i++)
{
if(!precache_sound(g_sounds[i]))
{
log_amx("* Error: Could not precache (%s), plugin stopped.", g_sounds[i])
pause("ad")
}
}
for(new i = 0; i < sizeof g_teamattack_sounds; i++)
{
if(!precache_sound(g_teamattack_sounds[i]))
{
log_amx("* Error: Could not precache (%s), plugin stopped.", g_teamattack_sounds[i])
pause("ad")
}
}
}
public say_elo_handle(id)
{
play_sound(id, 0)
}
public say_siema_handle(id)
{
play_sound(id, 1)
}
public say_siemano_handle(id)
{
play_sound(id, 2)
}
public play_sound(id, soundid)
{
static buffer[64]
format(buffer, 63, "sound/%s", g_sounds[soundid])
if(is_user_alive(id))
{
for(new i = 0; i < g_maxplayers; i++)
{
if(is_user_connected(i))
{
console_cmd(id, "spk %s", buffer)
}
}
}
else
{
for(new i = 0; i < g_maxplayers; i++)
{
if(is_user_connected(i) && !is_user_alive(i))
{
console_cmd(id, "spk %s", buffer)
}
}
}
return PLUGIN_HANDLED
}
public client_damage(attacker, victim, damage, wpnindex, hitplace, TA)
{
if(TA)
{
emit_sound(victim, CHAN_VOICE, g_teamattack_sounds[random_num(0, sizeof g_teamattack_sounds - 1)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
}
}
działają tylko dźwięki z pluginu sprzed edycji ale kasując plik u siebie na kompie nie chce też ich pobrać z serwera