hlmod.hu
https://hlmod.hu/

Ölés üzenet javítás
https://hlmod.hu/viewtopic.php?f=24&t=17514
Oldal: 1 / 1

Szerző:  Somterno [2014.10.07. 22:13 ]
Hozzászólás témája:  Ölés üzenet javítás

Valaki ki tudná javítani?? Lehet nagy a hiba de lehet elnéztem vamit köszi előre is :)


SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <colorchat>
  4.  
  5. #define PLUGIN "New Plugin"
  6. #define VERSION "1.0"
  7. #define AUTHOR "CrB"
  8.  
  9.  
  10. public plugin_init() {
  11. register_plugin(PLUGIN, VERSION, AUTHOR)
  12. register_event("DeathMsg", "halal", "a")
  13. }
  14. public halal()
  15. {
  16. new killer = read_data(1)
  17. new victim = read_data(2)
  18. new victimname[32]
  19. get_user_name(victim, victimname, 31)
  20. if(killer != victim)
  21. {
  22. set_hudmessage(255, 255, 0, 0.3, 0.35, 0, 6.0, 8.0)
  23. show_hudmessage(killer, "+1 FRAG")
  24. {
  25. ColorChat(id, BLUE, "^3[^4<~Illusi0n~>'<OnlyDust2>^3] ^4Megölted ^1 %s ^4-t!");
  26. }
  27. }
  28. stock print_color(const id, const input[], any:...)
  29. {
  30. new count = 1, players[32]
  31. static msg[191]
  32. vformat(msg, 190, input, 3)
  33.  
  34. replace_all(msg, 190, "!g", "^4")
  35. replace_all(msg, 190, "!y", "^1")
  36. replace_all(msg, 190, "!t", "^3")
  37. replace_all(msg, 190, "á", "á")
  38. replace_all(msg, 190, "é", "Ă©")
  39. replace_all(msg, 190, "í", "Ă­")
  40. replace_all(msg, 190, "ó", "Ăł")
  41. replace_all(msg, 190, "ö", "ö")
  42. replace_all(msg, 190, "ő", "Ĺ‘")
  43. replace_all(msg, 190, "ú", "Ăş")
  44. replace_all(msg, 190, "ü", "ĂĽ")
  45. replace_all(msg, 190, "ű", "ű")
  46. replace_all(msg, 190, "Á", "Á")
  47. replace_all(msg, 190, "É", "É")
  48. replace_all(msg, 190, "Í", "ĂŤ")
  49. replace_all(msg, 190, "Ó", "Ă“")
  50. replace_all(msg, 190, "Ö", "Ă–")
  51. replace_all(msg, 190, "Ő", "Ő")
  52. replace_all(msg, 190, "Ú", "Ăš")
  53. replace_all(msg, 190, "Ü", "Ăś")
  54. replace_all(msg, 190, "Ű", "Ű")
  55.  
  56. if (id) players[0] = id; else get_players(players, count, "ch")
  57. {
  58. for (new i = 0; i < count; i++)
  59. {
  60. if (is_user_connected(players[i]))
  61. {
  62. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  63. write_byte(players[i])
  64. write_string(msg)
  65. message_end()
  66. }
  67. }
  68. }
  69. return PLUGIN_HANDLED
  70. }
  71.  

Szerző:  sky97 [2014.10.08. 14:11 ]
Hozzászólás témája:  Re: javítás

Ajánlom ezt! https://forums.alliedmods.net/showthread.php?p=798314

Szerző:  CrB [2014.10.08. 15:40 ]
Hozzászólás témája:  Re: Ölés üzenet javítás

Tessék ennyi tünt fel telórol :D


EDIT: JAVÍTVA MOSTMÁR LEFORDUL!

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <colorchat>
  4.  
  5. #define PLUGIN "New Plugin"
  6. #define VERSION "1.0"
  7. #define AUTHOR "CrB"
  8.  
  9.  
  10. public plugin_init() {
  11. register_plugin(PLUGIN, VERSION, AUTHOR)
  12. register_event("DeathMsg", "halal", "a")
  13. }
  14. public halal()
  15. {
  16. new killer = read_data(1)
  17. new victim = read_data(2)
  18. new victimname[32]
  19. get_user_name(victim, victimname, 31)
  20. if(killer != victim)
  21. {
  22. set_hudmessage(255, 255, 0, 0.3, 0.35, 0, 6.0, 8.0)
  23. show_hudmessage(killer, "+1 FRAG")
  24. ColorChat(killer, BLUE, "^3[^4<~Illusi0n~>'<OnlyDust2>^3] ^4Megölted ^1 %s ^4-t!", victimname);
  25. }
  26. }
  27. stock print_color(const id, const input[], any:...)
  28. {
  29. new count = 1, players[32]
  30. static msg[191]
  31. vformat(msg, 190, input, 3)
  32.  
  33. replace_all(msg, 190, "!g", "^4")
  34. replace_all(msg, 190, "!y", "^1")
  35. replace_all(msg, 190, "!t", "^3")
  36. replace_all(msg, 190, "á", "á")
  37. replace_all(msg, 190, "é", "Ă©")
  38. replace_all(msg, 190, "í", "Ă­")
  39. replace_all(msg, 190, "ó", "Ăł")
  40. replace_all(msg, 190, "ö", "ö")
  41. replace_all(msg, 190, "ő", "Ĺ‘")
  42. replace_all(msg, 190, "ú", "Ăş")
  43. replace_all(msg, 190, "ü", "ĂĽ")
  44. replace_all(msg, 190, "ű", "ű")
  45. replace_all(msg, 190, "Á", "Á")
  46. replace_all(msg, 190, "É", "É")
  47. replace_all(msg, 190, "Í", "ĂŤ")
  48. replace_all(msg, 190, "Ó", "Ă“")
  49. replace_all(msg, 190, "Ö", "Ă–")
  50. replace_all(msg, 190, "Ő", "Ő")
  51. replace_all(msg, 190, "Ú", "Ăš")
  52. replace_all(msg, 190, "Ü", "Ăś")
  53. replace_all(msg, 190, "Ű", "Ű")
  54.  
  55. if (id) players[0] = id; else get_players(players, count, "ch")
  56. {
  57. for (new i = 0; i < count; i++)
  58. {
  59. if (is_user_connected(players[i]))
  60. {
  61. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  62. write_byte(players[i])
  63. write_string(msg)
  64. message_end()
  65. }
  66. }
  67. }
  68. return PLUGIN_HANDLED
  69. }

Szerző:  Somterno [2014.10.08. 16:30 ]
Hozzászólás témája:  Re: Ölés üzenet javítás

Még mindig nem jó azért köszi a fáradozást :(

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