hlmod.hu
https://hlmod.hu/

Bunnyhop késleltetés
https://hlmod.hu/viewtopic.php?f=10&t=17704
Oldal: 1 / 1

Szerző:  Beckx [ 2014.10.24. 11:41 ]
Hozzászólás témája:  Bunnyhop késleltetés

Üdv!
Valamiért nem fordítja, valaki javítaná? Köszi előre is!


SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <cstrike>
  3.  
  4. #define VISSZASZAMLALAS 10
  5.  
  6. new bunny[33]
  7.  
  8. public plugin_init()
  9. {
  10. register_plugin( "Bhop", "1.0", "HLmod.hu Community" );
  11. register_logevent( "eRound_start", 2, "1=Round_Start" );
  12. }
  13.  
  14. public eRound_start()
  15. {
  16. new iPlayers[32], iNum, iPid;
  17. get_players( iPlayers, iNum, "a" );
  18.  
  19. for( new i; i < iNum; i++ )
  20. {
  21. iPid = iPlayers[i];
  22. bunnyiPid] = VISSZASZAMLALAS
  23. bunnyhoppszamlalo(iPid)
  24. }
  25.  
  26. }
  27.  
  28. public bunnyhoppszamlalo(id)
  29. {
  30. if(!is_user_alive(id) || !is_user_connected(id))
  31. return PLUGIN_CONTINUE
  32.  
  33. if(bunny[id] > 0)
  34. {
  35. set_hudmessage(random(256), random(256), random(256), -1.0, 0.30, 1, 0.0, 1.1, 0.0, 0.0, -1)
  36. show_hudmessage(id, "BunnyHop %s másodperc múlva engedélyezve lesz!", bunny[id])
  37.  
  38. bunny[id]--
  39.  
  40. set_task(1.0, "bunnyhoppszamlalo",id)
  41. }
  42. else
  43. {
  44. set_hudmessage(random(256), random(256), random(256), -1.0, 0.30, 2, 0.0, 1.1, 0.0, 0.0, -1)
  45. show_hudmessage(id, "BunnyHop engedélyezve!")
  46. }
  47.  
  48.  
  49. return PLUGIN_CONTINUE
  50. }
  51. stock print_color(const id, const input[], any:...)
  52. {
  53. new count = 1, players[32]
  54. static msg[191]
  55. vformat(msg, 190, input, 3)
  56.  
  57. replace_all(msg, 190, "!g", "^4")
  58. replace_all(msg, 190, "!y", "^1")
  59. replace_all(msg, 190, "!t", "^3")
  60. replace_all(msg, 190, "á", "á")
  61. replace_all(msg, 190, "é", "Ă©")
  62. replace_all(msg, 190, "í", "Ă­")
  63. replace_all(msg, 190, "ó", "Ăł")
  64. replace_all(msg, 190, "ö", "ö")
  65. replace_all(msg, 190, "ő", "Ĺ‘")
  66. replace_all(msg, 190, "ú", "Ăş")
  67. replace_all(msg, 190, "ü", "ĂĽ")
  68. replace_all(msg, 190, "ű", "ű")
  69. replace_all(msg, 190, "Á", "Á")
  70. replace_all(msg, 190, "É", "É")
  71. replace_all(msg, 190, "Í", "ĂŤ")
  72. replace_all(msg, 190, "Ó", "Ă“")
  73. replace_all(msg, 190, "Ö", "Ă–")
  74. replace_all(msg, 190, "Ő", "Ő")
  75. replace_all(msg, 190, "Ú", "Ăš")
  76. replace_all(msg, 190, "Ü", "Ăś")
  77. replace_all(msg, 190, "Ű", "Ĺ°")
  78.  
  79. if (id) players[0] = id; else get_players(players, count, "ch")
  80. {
  81. for (new i = 0; i < count; i++)
  82. {
  83. if (is_user_connected(players[i]))
  84. {
  85. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  86. write_byte(players[i])
  87. write_string(msg)
  88. message_end()
  89. }
  90. }
  91. }
  92. return PLUGIN_HANDLED
  93. }
  94.  

Szerző:  RaZzoR [ 2014.10.24. 14:35 ]
Hozzászólás témája:  Re: Bunnyhop késleltetés

22. sor javítva:

SMA Forráskód: [ Mindet kijelol ]
  1. bunny[iPid] = VISSZASZAMLALAS

Szerző:  Connor [ 2014.10.24. 15:15 ]
Hozzászólás témája:  Re: Bunnyhop késleltetés

Köszönet RaZzoR felhasználónak!

Tessék:

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <cstrike>
  3.  
  4. #define VISSZASZAMLALAS 10
  5.  
  6. new bunny[33]
  7.  
  8. public plugin_init()
  9. {
  10. register_plugin( "Bhop", "1.0", "HLmod.hu Community" );
  11. register_logevent( "eRound_start", 2, "1=Round_Start" );
  12. }
  13.  
  14. public eRound_start()
  15. {
  16. new iPlayers[32], iNum, iPid;
  17. get_players( iPlayers, iNum, "a" );
  18.  
  19. for( new i; i < iNum; i++ )
  20. {
  21. iPid = iPlayers[i];
  22. bunny[iPid] = VISSZASZAMLALAS
  23. bunnyhoppszamlalo(iPid)
  24. }
  25.  
  26. }
  27.  
  28. public bunnyhoppszamlalo(id)
  29. {
  30. if(!is_user_alive(id) || !is_user_connected(id))
  31. return PLUGIN_CONTINUE
  32.  
  33. if(bunny[id] > 0)
  34. {
  35. set_hudmessage(random(256), random(256), random(256), -1.0, 0.30, 1, 0.0, 1.1, 0.0, 0.0, -1)
  36. show_hudmessage(id, "BunnyHop %s másodperc múlva engedélyezve lesz!", bunny[id])
  37.  
  38. bunny[id]--
  39.  
  40. set_task(1.0, "bunnyhoppszamlalo",id)
  41. }
  42. else
  43. {
  44. set_hudmessage(random(256), random(256), random(256), -1.0, 0.30, 2, 0.0, 1.1, 0.0, 0.0, -1)
  45. show_hudmessage(id, "BunnyHop engedélyezve!")
  46. }
  47.  
  48.  
  49. return PLUGIN_CONTINUE
  50. }
  51. stock print_color(const id, const input[], any:...)
  52. {
  53. new count = 1, players[32]
  54. static msg[191]
  55. vformat(msg, 190, input, 3)
  56.  
  57. replace_all(msg, 190, "!g", "^4")
  58. replace_all(msg, 190, "!y", "^1")
  59. replace_all(msg, 190, "!t", "^3")
  60. replace_all(msg, 190, "á", "á")
  61. replace_all(msg, 190, "é", "Ă©")
  62. replace_all(msg, 190, "í", "Ă­")
  63. replace_all(msg, 190, "ó", "Ăł")
  64. replace_all(msg, 190, "ö", "ö")
  65. replace_all(msg, 190, "ő", "Ĺ‘")
  66. replace_all(msg, 190, "ú", "Ăş")
  67. replace_all(msg, 190, "ü", "ĂĽ")
  68. replace_all(msg, 190, "ű", "ű")
  69. replace_all(msg, 190, "Á", "Á")
  70. replace_all(msg, 190, "É", "É")
  71. replace_all(msg, 190, "Í", "ĂŤ")
  72. replace_all(msg, 190, "Ó", "Ă“")
  73. replace_all(msg, 190, "Ö", "Ă–")
  74. replace_all(msg, 190, "Ő", "Ő")
  75. replace_all(msg, 190, "Ú", "Ăš")
  76. replace_all(msg, 190, "Ü", "Ăś")
  77. replace_all(msg, 190, "Ű", "Ĺ°")
  78.  
  79. if (id) players[0] = id; else get_players(players, count, "ch")
  80. {
  81. for (new i = 0; i < count; i++)
  82. {
  83. if (is_user_connected(players[i]))
  84. {
  85. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  86. write_byte(players[i])
  87. write_string(msg)
  88. message_end()
  89. }
  90. }
  91. }
  92. return PLUGIN_HANDLED
  93. }

Szerző:  Beckx [ 2014.10.25. 14:44 ]
Hozzászólás témája:  Re: Bunnyhop késleltetés

Már megoldottam, razor előtt:D

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