hlmod.hu
https://hlmod.hu/

Kör legjobbja ékezettel hudosan...
https://hlmod.hu/viewtopic.php?f=9&t=14429
Oldal: 1 / 1

Szerző:  sajtoskecske55 [ 2014.02.15. 18:32 ]
Hozzászólás témája:  Kör legjobbja ékezettel hudosan...

Nem írja ki HUD-ba ékezettel a kör legjobbjait...
Pedig át van kódolva UTF-8 kódolásra , de amikor át akarom konvertálni .amxx-re , akkor az amxx studioba pirosan át húzza a dhudmessage cuccost , és nem engedi...
Valaki meg csinálná nekem ezt az SMA-t , hogy HUD-ba ki írja ékezettel a top 3 kör legjobbjait?
Előre is köszönöm!

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <hamsandwich>
  4. #include <dhudmessage>
  5. #include <cstrike>
  6.  
  7. #define PLUGIN "New Plugin"
  8. #define AUTHOR "Unknown"
  9. #define VERSION "1.0"
  10.  
  11. new g_iKills[32];
  12. new top1, top2, top3;
  13.  
  14. public plugin_init()
  15. {
  16. register_plugin(PLUGIN, VERSION, AUTHOR)
  17.  
  18. register_event("DeathMsg", "EventDeathMsg", "a")
  19. register_logevent("RoundEnd", 2, "1=Round_End")
  20. }
  21. public client_disconnect(id)
  22. {
  23. g_iKills[id] = 0;
  24. }
  25. public EventDeathMsg()
  26. {
  27. new killer = read_data(1)
  28. new victim = read_data(2)
  29.  
  30. if(killer != victim && killer && cs_get_user_team(killer) != cs_get_user_team(victim))
  31. {
  32. g_iKills[killer]++;
  33.  
  34. }
  35. else
  36. g_iKills[killer]--;
  37. }
  38. public RoundEnd()
  39. {
  40. new players[32], num;
  41. get_players(players, num);
  42. SortCustom1D(players, num, "sort_bestplayer")
  43.  
  44. top1 = players[0]
  45. top2 = players[1]
  46. top3 = players[2]
  47.  
  48. new top1neve[33], top2neve[33], top3neve[33];
  49. get_user_name(top1, top1neve, charsmax(top1neve))
  50. get_user_name(top2, top2neve, charsmax(top2neve))
  51. get_user_name(top3, top3neve, charsmax(top3neve))
  52.  
  53. set_dhudmessage(random(256), random(256), random(256), 0.29, 0.42,0,6.0,12.0,0.1,0.2)
  54. show_dhudmessage(0, "Ebben a Körben a Legjobb játékosok:^n1. %s^n2. %s^n3. %s", top1neve, top2neve, top3neve)
  55. client_print(0, print_chat, "")
  56.  
  57. for(new i; i < 31; i++)
  58. {
  59. g_iKills[i] = 0;
  60. }
  61. }
  62.  
  63. public sort_bestplayer(id1, id2)
  64. {
  65. if(g_iKills[id1] > g_iKills[id2])
  66. return -1;
  67. else if(g_iKills[id1] < g_iKills[id2])
  68. return 1;
  69.  
  70. return 0;
  71. }

Szerző:  alfanero [ 2014.02.15. 18:33 ]
Hozzászólás témája:  Re: Kör legjobbja ékezettel hudosan...

studióval hiba nélkül lefutott.
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <hamsandwich>
  4. #include <dhudmessage>
  5. #include <cstrike>
  6.  
  7. #define PLUGIN "New Plugin"
  8. #define AUTHOR "Unknown"
  9. #define VERSION "1.0"
  10.  
  11. new g_iKills[32];
  12. new top1, top2, top3;
  13.  
  14. public plugin_init()
  15. {
  16. register_plugin(PLUGIN, VERSION, AUTHOR)
  17.  
  18. register_event("DeathMsg", "EventDeathMsg", "a")
  19. register_logevent("RoundEnd", 2, "1=Round_End")
  20. }
  21. public client_disconnect(id)
  22. {
  23. g_iKills[id] = 0;
  24. }
  25. public EventDeathMsg()
  26. {
  27. new killer = read_data(1)
  28. new victim = read_data(2)
  29.  
  30. if(killer != victim && killer && cs_get_user_team(killer) != cs_get_user_team(victim))
  31. {
  32. g_iKills[killer]++;
  33.  
  34. }
  35. else
  36. g_iKills[killer]--;
  37. }
  38. public RoundEnd()
  39. {
  40. new players[32], num;
  41. get_players(players, num);
  42. SortCustom1D(players, num, "sort_bestplayer")
  43.  
  44. top1 = players[0]
  45. top2 = players[1]
  46. top3 = players[2]
  47.  
  48. new top1neve[33], top2neve[33], top3neve[33];
  49. get_user_name(top1, top1neve, charsmax(top1neve))
  50. get_user_name(top2, top2neve, charsmax(top2neve))
  51. get_user_name(top3, top3neve, charsmax(top3neve))
  52.  
  53. set_dhudmessage(random(256), random(256), random(256), 0.29, 0.42,0,6.0,12.0,0.1,0.2)
  54. show_dhudmessage(0, "Ebben a Körben a Legjobb játékosok:^n1. %s^n2. %s^n3. %s", top1neve, top2neve, top3neve)
  55. client_print(0, print_chat, "")
  56.  
  57. for(new i; i < 31; i++)
  58. {
  59. g_iKills[i] = 0;
  60. }
  61. }
  62.  
  63. public sort_bestplayer(id1, id2)
  64. {
  65. if(g_iKills[id1] > g_iKills[id2])
  66. return -1;
  67. else if(g_iKills[id1] < g_iKills[id2])
  68. return 1;
  69.  
  70. return 0;
  71. }
  72. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  73.   *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1046\\ f0\\ fs16 \n\\ par }
  74.   */
  75.  
  76. stock print_color(const id, const input[], any:...)
  77. {
  78. new count = 1, players[32]
  79. static msg[191]
  80. vformat(msg, 190, input, 3)
  81.  
  82. replace_all(msg, 190, "!g", "^4")
  83. replace_all(msg, 190, "!y", "^1")
  84. replace_all(msg, 190, "!t", "^3")
  85. replace_all(msg, 190, "á", "á")
  86. replace_all(msg, 190, "é", "Ă©")
  87. replace_all(msg, 190, "í", "Ă­")
  88. replace_all(msg, 190, "ó", "Ăł")
  89. replace_all(msg, 190, "ö", "ö")
  90. replace_all(msg, 190, "ő", "Ĺ‘")
  91. replace_all(msg, 190, "ú", "Ăş")
  92. replace_all(msg, 190, "ü", "ĂĽ")
  93. replace_all(msg, 190, "ű", "ű")
  94. replace_all(msg, 190, "Á", "Á")
  95. replace_all(msg, 190, "É", "É")
  96. replace_all(msg, 190, "Í", "ĂŤ")
  97. replace_all(msg, 190, "Ó", "Ă“")
  98. replace_all(msg, 190, "Ö", "Ă–")
  99. replace_all(msg, 190, "Ő", "Ő")
  100. replace_all(msg, 190, "Ú", "Ăš")
  101. replace_all(msg, 190, "Ü", "Ăś")
  102. replace_all(msg, 190, "Ű", "Ĺ°")
  103.  
  104. if (id) players[0] = id; else get_players(players, count, "ch")
  105. {
  106. for (new i = 0; i < count; i++)
  107. {
  108. if (is_user_connected(players[i]))
  109. {
  110. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  111. write_byte(players[i])
  112. write_string(msg)
  113. message_end()
  114. }
  115. }
  116. }
  117. return PLUGIN_HANDLED
  118. }
  119. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  120. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
  121. */
  122.  

Szerző:  sajtoskecske55 [ 2014.02.15. 22:51 ]
Hozzászólás témája:  Re: Kör legjobbja ékezettel hudosan...

Akkor valamit le be kéne raknom a mappákba? :( Hiányzik valamim? El küldtem , hogy mit ír. Mármint csatolmányokhoz be raktam vagy mihez...

Csatolmányok:
kecske.png
kecske.png [ 141.23 KiB | Megtekintve 1280 alkalommal ]

Szerző:  Badboy.killer [ 2014.02.15. 23:33 ]
Hozzászólás témája:  Re: Kör legjobbja ékezettel hudosan...

Tessék, lefut, teszteld
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <hamsandwich>
  4. #include <cstrike>
  5.  
  6. #define PLUGIN "New Plugin"
  7. #define AUTHOR "Unknown"
  8. #define VERSION "1.0"
  9.  
  10. new g_iKills[32];
  11. new top1, top2, top3;
  12.  
  13. public plugin_init()
  14. {
  15. register_plugin(PLUGIN, VERSION, AUTHOR)
  16.  
  17. register_event("DeathMsg", "EventDeathMsg", "a")
  18. register_logevent("RoundEnd", 2, "1=Round_End")
  19. }
  20. public client_disconnect(id)
  21. {
  22. g_iKills[id] = 0;
  23. }
  24. public EventDeathMsg()
  25. {
  26. new killer = read_data(1)
  27. new victim = read_data(2)
  28.  
  29. if(killer != victim && killer && cs_get_user_team(killer) != cs_get_user_team(victim))
  30. {
  31. g_iKills[killer]++;
  32.  
  33. }
  34. else
  35. g_iKills[killer]--;
  36. }
  37. public RoundEnd()
  38. {
  39. new players[32], num;
  40. get_players(players, num);
  41. SortCustom1D(players, num, "sort_bestplayer")
  42.  
  43. top1 = players[0]
  44. top2 = players[1]
  45. top3 = players[2]
  46.  
  47. new top1neve[33], top2neve[33], top3neve[33];
  48. get_user_name(top1, top1neve, charsmax(top1neve))
  49. get_user_name(top2, top2neve, charsmax(top2neve))
  50. get_user_name(top3, top3neve, charsmax(top3neve))
  51.  
  52. set_hudmessage(random(256), random(256), random(256), 0.29, 0.42,0,6.0,12.0,0.1,0.2)
  53. show_hudmessage(0, "Ebben a Körben a Legjobb játékosok:^n1. %s^n2. %s^n3. %s", top1neve, top2neve, top3neve)
  54. client_print(0, print_chat, "")
  55.  
  56. for(new i; i < 31; i++)
  57. {
  58. g_iKills[i] = 0;
  59. }
  60. }
  61.  
  62. public sort_bestplayer(id1, id2)
  63. {
  64. if(g_iKills[id1] > g_iKills[id2])
  65. return -1;
  66. else if(g_iKills[id1] < g_iKills[id2])
  67. return 1;
  68.  
  69. return 0;
  70. }
  71. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  72.   *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1046\\ f0\\ fs16 \n\\ par }
  73.   */
  74.  
  75. stock print_color(const id, const input[], any:...)
  76. {
  77. new count = 1, players[32]
  78. static msg[191]
  79. vformat(msg, 190, input, 3)
  80.  
  81. replace_all(msg, 190, "!g", "^4")
  82. replace_all(msg, 190, "!y", "^1")
  83. replace_all(msg, 190, "!t", "^3")
  84. replace_all(msg, 190, "á", "á")
  85. replace_all(msg, 190, "é", "Ă©")
  86. replace_all(msg, 190, "í", "Ă­")
  87. replace_all(msg, 190, "ó", "Ăł")
  88. replace_all(msg, 190, "ö", "ö")
  89. replace_all(msg, 190, "ő", "Ĺ‘")
  90. replace_all(msg, 190, "ú", "Ăş")
  91. replace_all(msg, 190, "ü", "ĂĽ")
  92. replace_all(msg, 190, "ű", "ű")
  93. replace_all(msg, 190, "Á", "Á")
  94. replace_all(msg, 190, "É", "É")
  95. replace_all(msg, 190, "Í", "ĂŤ")
  96. replace_all(msg, 190, "Ó", "Ă“")
  97. replace_all(msg, 190, "Ö", "Ă–")
  98. replace_all(msg, 190, "Ő", "Ő")
  99. replace_all(msg, 190, "Ú", "Ăš")
  100. replace_all(msg, 190, "Ü", "Ăś")
  101. replace_all(msg, 190, "Ű", "Ĺ°")
  102.  
  103. if (id) players[0] = id; else get_players(players, count, "ch")
  104. {
  105. for (new i = 0; i < count; i++)
  106. {
  107. if (is_user_connected(players[i]))
  108. {
  109. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  110. write_byte(players[i])
  111. write_string(msg)
  112. message_end()
  113. }
  114. }
  115. }
  116. return PLUGIN_HANDLED
  117. }
  118. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  119. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
  120. */
  121.  

Szerző:  sajtoskecske55 [ 2014.02.16. 00:11 ]
Hozzászólás témája:  Re: Kör legjobbja ékezettel hudosan...

Köszönöm , jó lett. :D [Ment a gomb]

Badboy.killer írta:
Tessék, lefut, teszteld
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <hamsandwich>
  4. #include <cstrike>
  5.  
  6. #define PLUGIN "New Plugin"
  7. #define AUTHOR "Unknown"
  8. #define VERSION "1.0"
  9.  
  10. new g_iKills[32];
  11. new top1, top2, top3;
  12.  
  13. public plugin_init()
  14. {
  15. register_plugin(PLUGIN, VERSION, AUTHOR)
  16.  
  17. register_event("DeathMsg", "EventDeathMsg", "a")
  18. register_logevent("RoundEnd", 2, "1=Round_End")
  19. }
  20. public client_disconnect(id)
  21. {
  22. g_iKills[id] = 0;
  23. }
  24. public EventDeathMsg()
  25. {
  26. new killer = read_data(1)
  27. new victim = read_data(2)
  28.  
  29. if(killer != victim && killer && cs_get_user_team(killer) != cs_get_user_team(victim))
  30. {
  31. g_iKills[killer]++;
  32.  
  33. }
  34. else
  35. g_iKills[killer]--;
  36. }
  37. public RoundEnd()
  38. {
  39. new players[32], num;
  40. get_players(players, num);
  41. SortCustom1D(players, num, "sort_bestplayer")
  42.  
  43. top1 = players[0]
  44. top2 = players[1]
  45. top3 = players[2]
  46.  
  47. new top1neve[33], top2neve[33], top3neve[33];
  48. get_user_name(top1, top1neve, charsmax(top1neve))
  49. get_user_name(top2, top2neve, charsmax(top2neve))
  50. get_user_name(top3, top3neve, charsmax(top3neve))
  51.  
  52. set_hudmessage(random(256), random(256), random(256), 0.29, 0.42,0,6.0,12.0,0.1,0.2)
  53. show_hudmessage(0, "Ebben a Körben a Legjobb játékosok:^n1. %s^n2. %s^n3. %s", top1neve, top2neve, top3neve)
  54. client_print(0, print_chat, "")
  55.  
  56. for(new i; i < 31; i++)
  57. {
  58. g_iKills[i] = 0;
  59. }
  60. }
  61.  
  62. public sort_bestplayer(id1, id2)
  63. {
  64. if(g_iKills[id1] > g_iKills[id2])
  65. return -1;
  66. else if(g_iKills[id1] < g_iKills[id2])
  67. return 1;
  68.  
  69. return 0;
  70. }
  71. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  72.   *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1046\\ f0\\ fs16 \n\\ par }
  73.   */
  74.  
  75. stock print_color(const id, const input[], any:...)
  76. {
  77. new count = 1, players[32]
  78. static msg[191]
  79. vformat(msg, 190, input, 3)
  80.  
  81. replace_all(msg, 190, "!g", "^4")
  82. replace_all(msg, 190, "!y", "^1")
  83. replace_all(msg, 190, "!t", "^3")
  84. replace_all(msg, 190, "á", "á")
  85. replace_all(msg, 190, "é", "Ă©")
  86. replace_all(msg, 190, "í", "Ă­")
  87. replace_all(msg, 190, "ó", "Ăł")
  88. replace_all(msg, 190, "ö", "ö")
  89. replace_all(msg, 190, "ő", "Ĺ‘")
  90. replace_all(msg, 190, "ú", "Ăş")
  91. replace_all(msg, 190, "ü", "ĂĽ")
  92. replace_all(msg, 190, "ű", "ű")
  93. replace_all(msg, 190, "Á", "Á")
  94. replace_all(msg, 190, "É", "É")
  95. replace_all(msg, 190, "Í", "ĂŤ")
  96. replace_all(msg, 190, "Ó", "Ă“")
  97. replace_all(msg, 190, "Ö", "Ă–")
  98. replace_all(msg, 190, "Ő", "Ő")
  99. replace_all(msg, 190, "Ú", "Ăš")
  100. replace_all(msg, 190, "Ü", "Ăś")
  101. replace_all(msg, 190, "Ű", "Ĺ°")
  102.  
  103. if (id) players[0] = id; else get_players(players, count, "ch")
  104. {
  105. for (new i = 0; i < count; i++)
  106. {
  107. if (is_user_connected(players[i]))
  108. {
  109. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  110. write_byte(players[i])
  111. write_string(msg)
  112. message_end()
  113. }
  114. }
  115. }
  116. return PLUGIN_HANDLED
  117. }
  118. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  119. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
  120. */
  121.  

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