←  Problemy z pluginami

AMXX.pl: Support AMX Mod X i SourceMod

»

Round sound

Zablokowany

  • +
  • -
UnderMount - zdjęcie UnderMount 10.01.2009

Witam mam problemik bo nie wiem czy bedzie dzialac moj nowy round sound chcialbym zeby ktos zerkal

//RoundSound.amxx -by PaintLancer

#include <amxmodx>

public plugin_init()
{
register_plugin("RoundSound","1.0","PaintLancer")
register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")
}

public t_win()
{
new rand = random_num(0,2)

client_cmd(0,"stopsound")

switch(rand)
{
case 0: client_cmd(0,"spk misc/1")
case 1: client_cmd(0,"spk misc/2")
case 2: client_cmd(0,"spk misc/3")
case 4: client_cmd(0,"spk misc/4")
}

return PLUGIN_HANDLED
}

public ct_win()
{
new rand = random_num(0,2)

client_cmd(0,"stopsound")

switch(rand)
{
case 0: client_cmd(0,"spk misc/5")
case 1: client_cmd(0,"spk misc/6")
case 2: client_cmd(0,"spk misc/7")
case 3: client_cmd(0,"spk misc/8")
}

return PLUGIN_HANDLED
}

public plugin_precache()
{
precache_sound("misc/1.mp3")
precache_sound("misc/2.mp3")
precache_sound("misc/3.mp3")
precache_sound("misc/4.mp3")
precache_sound("misc/5.mp3")
precache_sound("misc/6.mp3")
precache_sound("misc/7.mp3")
precache_sound("misc/8.mp3")

return PLUGIN_CONTINUE
}
Odpowiedz

naXe - zdjęcie naXe 10.01.2009

precache_sound("misc/1.mp3")
precache_sound("misc/2.mp3")
precache_sound("misc/3.mp3")
precache_sound("misc/4.mp3")
precache_sound("misc/5.mp3")
precache_sound("misc/6.mp3")
precache_sound("misc/7.mp3")
precache_sound("misc/8.mp3")


musi być :

precache_sound("sound/misc/2.mp3")
precache_sound("sound/misc/3.mp3")
precache_sound("sound/misc/4.mp3")
precache_sound("sound/misc/5.mp3")
precache_sound("sound/misc/6.mp3")
precache_sound("sound/misc/7.mp3")
precache_sound("sound/misc/8.mp3")
Odpowiedz

  • +
  • -
Abes Mapper - zdjęcie Abes Mapper 10.01.2009

case 0: client_cmd(0,"spk misc/1")


spk jest od wav a od mp3 jest mp3 play
Odpowiedz

  • +
  • -
UnderMount - zdjęcie UnderMount 10.01.2009

bez tej 1 mam zrobic to jak bedzie mi muza grala ??

[ Dodano: 10-01-2009, 18:29 ]
Wgralem wszystko tak jak napisaliscie i mzue pobiera ale nie gra.

[ Dodano: 10-01-2009, 18:31 ]
//RoundSound.amxx -by PaintLancer

#include <amxmodx>

public plugin_init()
{
register_plugin("RoundSound","1.0","PaintLancer")
register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")
}

public t_win()
{
new rand = random_num(0,3)

client_cmd(0,"mp3 stop")

switch(rand)
{
case 0: client_cmd(0,"mp3 loop misc/1")
case 1: client_cmd(0,"mp3 loop misc/2")
case 2: client_cmd(0,"mp3 loop misc/3")
case 4: client_cmd(0,"mp3 loop misc/4")
}

return PLUGIN_HANDLED
}

public ct_win()
{
new rand = random_num(0,4)

client_cmd(0,"mp3 stop")

switch(rand)
{
case 0: client_cmd(0,"mp3 loop misc/5")
case 1: client_cmd(0,"mp3 loop misc/6")
case 2: client_cmd(0,"mp3 loop misc/7")
case 3: client_cmd(0,"mp3 loop misc/8")
}

return PLUGIN_HANDLED
}

public plugin_precache()
{
precache_sound("misc/2.mp3")
precache_sound("misc/3.mp3")
precache_sound("misc/4.mp3")
precache_sound("misc/5.mp3")
precache_sound("misc/6.mp3")
precache_sound("misc/7.mp3")
precache_sound("misc/8.mp3")

return PLUGIN_CONTINUE
}

Dodalem plik amxx do plugins i dopisalem linike roundsound.amxx do plugins.ini
Odpowiedz

  • +
  • -
Abes Mapper - zdjęcie Abes Mapper 10.01.2009

Zgubiłeś:
precache_sound("misc/1.mp3")

Nie zrobiłeś co napisał kolega chOOp'ek

PS:A kompilowałeś to w góle do postaci *.amxx ?

PS2: Polecam ci to:

#include <amxmodx> 

new const sounds_ct[][] = {"sound/misc/1.mp3","sound/misc/2.mp3","sound/misc/3.mp3","sound/misc/4.mp3","sound/misc/5.mp3"} 

new const sounds_terro[][] = {"sound/misc/6.mp3","sound/misc/7.mp3","sound/misc/8.mp3"} 

public plugin_init() 
{ 
  register_plugin("RoundSoundy","1","Sal") 
  register_event("SendAudio", "ct", "a", "2&%!MRAD_ctwin") 
  register_event("SendAudio", "terro", "a", "2&%!MRAD_terwin") 
} 

public plugin_precache() 
{ 
  new i 
  for(i = 0; i < sizeof sounds_ct; i++) 
  precache_generic(sounds_ct[i]) 

  new u 
  for(u = 0; u < sizeof sounds_terro; u++) 
  precache_generic(sounds_terro[u]) 
} 

public ct() 
{ 
  client_cmd(0,"stopsound") 

  client_cmd(0, "mp3 stop") 

  client_cmd(0, "mp3 play %s", sounds_ct[random_num(0, charsmax(sounds_ct))] ) 
} 

public terro() 
{ 
  client_cmd(0,"stopsound") 

  client_cmd(0, "mp3 stop") 

  client_cmd(0, "mp3 play %s", sounds_terro[random_num(0, charsmax(sounds_terro))] ) 
}
Odpowiedz

  • +
  • -
UnderMount - zdjęcie UnderMount 10.01.2009

to co ja mam juz z tym zrobic dopisalem ta linike i tearz mam przez ta strone zrobic to co napisales i nazwac roundsound

Sory ale jak by ktos mogl to zrobil mi te sma i amxx a ja bym wkleil pomogl jzu dalem.
Odpowiedz

  • +
  • -
Abes Mapper - zdjęcie Abes Mapper 10.01.2009

Prosz.

Załączone pliki

Odpowiedz

  • +
  • -
MafiaDL - zdjęcie MafiaDL 11.01.2009

jak cos to pw i odblokuje
Odpowiedz
Zablokowany