hlmod.hu
https://hlmod.hu/

bomba hang
https://hlmod.hu/viewtopic.php?f=9&t=17346
Oldal: 1 / 1

Szerző:  NuD[!]e [2014.09.17. 19:12 ]
Hozzászólás témája:  bomba hang

Vki bele tudna 1 +hangot irni?:) PLS
Bomba hang

Szerző:  Applee [2014.09.17. 20:40 ]
Hozzászólás témája:  Re: bomba hang

Régi
SMA Forráskód: [ Mindet kijelol ]
  1. public plugin_precache(){
  2. precache_sound("c4_misc/planted1.wav")


Talán

Új
SMA Forráskód: [ Mindet kijelol ]
  1. public plugin_precache(){
  2. precache_sound("c4_misc/planted1.wav")
  3. precache_sound("c4_misc/planted2.wav")

Szerző:  dekarn [2014.09.17. 21:19 ]
Hozzászólás témája:  Re: bomba hang

Teszteld le. :)
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN "Bomb Sound"
  5. #define VERSION "1.0"
  6. #define AUTHOR "Starsailor"
  7.  
  8.  
  9. forward bomb_planted(planter);
  10.  
  11.  
  12.  
  13. public plugin_init() {
  14. register_plugin(PLUGIN, VERSION, AUTHOR)
  15.  
  16. }
  17.  
  18. public plugin_precache(){
  19. precache_sound("c4_misc/planted1.wav")
  20. precache_sound("c4_misc/planted2.wav")
  21. }
  22.  
  23.  
  24.  
  25. public bomb_planted(id) {
  26. new plantername[32]
  27. get_user_name(id,plantername,31)
  28. set_hudmessage(255, 0, 0, -1.0, 0.2, 1, 6.0, 6.0)
  29. show_hudmessage(0, "%s elesitette a bombat!", plantername)
  30. emit_sound(0,CHAN_AUTO,"c4_misc/planted1.wav",VOL_NORM,ATTN_NORM,0,PITCH_NORM);
  31. }

Szerző:  CrB [2014.09.17. 21:24 ]
Hozzászólás témája:  Re: bomba hang

Miért játszatod le mind2 őt?

Teszteld:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN "Bomb Sound"
  5. #define VERSION "1.0"
  6. #define AUTHOR "Starsailor"
  7.  
  8. public plugin_init() {
  9. register_plugin(PLUGIN, VERSION, AUTHOR)
  10.  
  11. }
  12.  
  13. public plugin_precache(){
  14. precache_sound("c4_misc/planted1.wav")
  15. precache_sound("c4_misc/planted2.wav")
  16. }
  17.  
  18.  
  19.  
  20. public bomb_planted(id) {
  21. new plantername[32]
  22. get_user_name(id,plantername,31)
  23. set_hudmessage(255, 0, 0, -1.0, 0.2, 1, 6.0, 6.0)
  24. show_hudmessage(0, "%s elesitette a bombat!", plantername)
  25. switch(random_num(1,2))
  26. {
  27. case 1: emit_sound(0,CHAN_AUTO,"c4_misc/planted1.wav",VOL_NORM,ATTN_NORM,0,PITCH_NORM);
  28. case 2: emit_sound(0,CHAN_AUTO,"c4_misc/planted2.wav",VOL_NORM,ATTN_NORM,0,PITCH_NORM);
  29. }
  30.  
  31.  
  32. }

Én megoldásom (nem tuti h működik mert itt írtam hlmodon :D) constansba írsz 1 elérési utat és letölti + randomra le is játsza ha épp azt választja ki.
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN "Bomb Sound"
  5. #define VERSION "1.0"
  6. #define AUTHOR "Starsailor"
  7.  
  8. new const hangok[][] = {
  9. "sound/c4_misc/planted1.wav",
  10. "sound/c4_misc/planted2.wav"
  11. }
  12.  
  13. public plugin_init() {
  14. register_plugin(PLUGIN, VERSION, AUTHOR)
  15.  
  16. }
  17.  
  18. public plugin_precache(){
  19. for(new asd=0; asd<sizeof(hangok); asd++)
  20. {
  21. precache_generic(hangok[asd])
  22. }
  23. }
  24.  
  25.  
  26.  
  27. public bomb_planted(id) {
  28. new plantername[32]
  29. get_user_name(id,plantername,31)
  30. set_hudmessage(255, 0, 0, -1.0, 0.2, 1, 6.0, 6.0)
  31. show_hudmessage(0, "%s elesitette a bombat!", plantername)
  32. emit_sound(0,CHAN_AUTO,hangok[random(sizeof(hangok))],VOL_NORM,ATTN_NORM,0,PITCH_NORM);
  33.  
  34.  
  35. }

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/