hlmod.hu
https://hlmod.hu/

Kezdő hang másképp
https://hlmod.hu/viewtopic.php?f=9&t=14352
Oldal: 1 / 1

Szerző:  Telapo11 [ 2014.02.10. 14:51 ]
Hozzászólás témája:  Kezdő hang másképp

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. new const PLUGIN [] = "AMX Round Count"
  5. new const VERSION [] = "0.0.1"
  6. new const AUTHOR [] = "Duna"
  7.  
  8. new g_roundCount
  9.  
  10. public plugin_init(){
  11. register_plugin(PLUGIN,VERSION,AUTHOR)
  12. register_event("RoundTime", "roundcount", "bc")
  13. register_event("TextMsg","reset_counter","a","2&#Game_C","2&#Game_w")
  14. return PLUGIN_CONTINUE
  15. }
  16.  
  17. new prepare_sounds[][] =
  18. {
  19. "SemTex_Rcount/prepare1",
  20. "SemTex_Rcount/prepare2",
  21. "SemTex_Rcount/prepare3",
  22. "SemTex_Rcount/prepare4"
  23. };
  24.  
  25. public roundcount()
  26. if ( read_data(1) == floatround(get_cvar_float("mp_roundtime") * 60.0) ) {
  27.  
  28. ++g_roundCount
  29.  
  30. new r = random(256)
  31. new g = random(256)
  32. new b = random(256)
  33.  
  34.  
  35. set_hudmessage(random(256), random(256), random(256), -1.0, 0.30, 0, 6.0, 6.0, 1.0, 0.15, 1)
  36. show_hudmessage(0,"^nKészülj fel a Csatára!^n%d. Forduló!", g_roundCount)
  37.  
  38. client_cmd(0,"spk %s",prepare_sounds[random(sizeof prepare_sounds)]);
  39. }
  40.  
  41. public reset_counter(){
  42. g_roundCount = 0
  43. }
  44.  
  45. public plugin_precache(){
  46. precache_sound("SemTex_Rcount/prepare1.wav")
  47. precache_sound("SemTex_Rcount/prepare2.wav")
  48. precache_sound("SemTex_Rcount/prepare3.wav")
  49. precache_sound("SemTex_Rcount/prepare4.wav")
  50. return PLUGIN_CONTINUE
  51. }
  52.  
  53. /*==========================================================================================
  54.   the end ...
  55. ===========================================================================================*/
  56.  
  57. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  58. *{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1046{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
  59. */
  60.  


Ezt kéne nekem ugy megcsinálni hogy Prepare1 hez legyen egy szöveg és mindegyik preparehez legyen külön szöveg és mindig változzon a szöveg ha megy a kör

Szerző:  alfanero [ 2014.02.10. 15:03 ]
Hozzászólás témája:  Re: Kezdő hang másképp

SMA Forráskód: [ Mindet kijelol ]
  1.  
  2. #include <amxmodx>
  3. #include <amxmisc>
  4.  
  5. new const PLUGIN [] = "AMX Round Count"
  6. new const VERSION [] = "0.0.1"
  7. new const AUTHOR [] = "Duna"
  8.  
  9. new g_roundCount
  10.  
  11. public plugin_init(){
  12. register_plugin(PLUGIN,VERSION,AUTHOR)
  13. register_event("RoundTime", "roundcount", "bc")
  14. register_event("TextMsg","reset_counter","a","2&#Game_C","2&#Game_w")
  15. return PLUGIN_CONTINUE
  16. }
  17.  
  18. new prepare_sounds[][] =
  19. {
  20. "SemTex_Rcount/prepare1",
  21. "SemTex_Rcount/prepare2",
  22. "SemTex_Rcount/prepare3",
  23. "SemTex_Rcount/prepare4"
  24. };
  25.  
  26. public roundcount()
  27. if ( read_data(1) == floatround(get_cvar_float("mp_roundtime") * 60.0) ) {
  28.  
  29. ++g_roundCount
  30.  
  31. new r = random(256)
  32. new g = random(256)
  33. new b = random(256)
  34. new randomhud = random_num(1, 4)
  35. switch(randomhud)
  36. {
  37. case 1:
  38. {
  39. set_hudmessage(r,g,b, -1.0, 0.30, 0, 6.0, 6.0, 1.0, 0.15, 1)
  40. show_hudmessage(0,"^nKészülj fel a Csatára!^n%d. Forduló!", g_roundCount)
  41. }
  42. case 2:
  43. {
  44. set_hudmessage(r,g,b, -1.0, 0.30, 0, 6.0, 6.0, 1.0, 0.15, 1)
  45. show_hudmessage(0,"^nKészülj fel a Csatára!^n%d. Forduló!", g_roundCount)
  46. }
  47. case 3:
  48. {
  49. set_hudmessage(r,g,b, -1.0, 0.30, 0, 6.0, 6.0, 1.0, 0.15, 1)
  50. show_hudmessage(0,"^nKészülj fel a Csatára!^n%d. Forduló!", g_roundCount)
  51. }
  52. case 4:
  53. {
  54. set_hudmessage(r,g,b, -1.0, 0.30, 0, 6.0, 6.0, 1.0, 0.15, 1)
  55. show_hudmessage(0,"^nKészülj fel a Csatára!^n%d. Forduló!", g_roundCount)
  56. }
  57. }
  58. client_cmd(0,"spk %s",prepare_sounds[random(sizeof prepare_sounds)]);
  59. }
  60.  
  61. public reset_counter(){
  62. g_roundCount = 0
  63. }
  64.  
  65. public plugin_precache(){
  66. precache_sound("SemTex_Rcount/prepare1.wav")
  67. precache_sound("SemTex_Rcount/prepare2.wav")
  68. precache_sound("SemTex_Rcount/prepare3.wav")
  69. precache_sound("SemTex_Rcount/prepare4.wav")
  70. return PLUGIN_CONTINUE
  71. }
  72.  
  73. /*==========================================================================================
  74.   the end ...
  75. ===========================================================================================*/
  76.  
  77. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  78. *{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1046{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
  79. */
  80.  

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