hlmod.hu
https://hlmod.hu/

Ez így jó?
https://hlmod.hu/viewtopic.php?f=9&t=14607
Oldal: 1 / 1

Szerző:  theglorious [2014.02.26. 21:09 ]
Hozzászólás témája:  Ez így jó?

Így kiírja chat ba és hudba is? :) Átalakításnál nincs hiba
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN "asd"
  5. #define VERSION "1.0"
  6. #define AUTHOR "asd"
  7.  
  8. new round
  9.  
  10. public plugin_init() {
  11. register_plugin(PLUGIN, VERSION, AUTHOR)
  12. register_logevent("round_start", 2, "1=Round_Start")
  13. register_event("TextMsg", "game_restart", "a", "2&#Game_C", "2&#Game_w")
  14. }
  15. public game_restart()
  16. {
  17. round = 0
  18. }
  19. public round_start(){
  20. new mapname[32]
  21. get_mapname(mapname, 31)
  22. round++
  23. if(round == 50){
  24. server_cmd("changelevel de_dust2")
  25. }
  26. print_color(0, "!gKör: !t%d!y/!t50 !y| !gPálya: !t%s !y| !gJátékosok: !t%d!y/!t%d !y| !t%d. !gkör elkezdődött, jó játékot!",round,mapname, get_playersnum(), get_maxplayers(), round)
  27. set_hudmessage(random(256), random(256), random(256), 0.29, 0.42,0,6.0,12.0,0.1,0.2)
  28. show_hudmessage(0, "%d. kör, jó játékot!", round)
  29. }
  30.  
  31. stock print_color(const id, const input[], any:...)
  32. {
  33. new count = 1, players[32]
  34. static msg[191]
  35. vformat(msg, 190, input, 3)
  36.  
  37. replace_all(msg, 190, "!g", "^4")
  38. replace_all(msg, 190, "!y", "^1")
  39. replace_all(msg, 190, "!t", "^3")
  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. replace_all(msg, 190, "Ú", "Ăš")
  56. replace_all(msg, 190, "Ü", "Ăś")
  57. replace_all(msg, 190, "Ű", "Ű")
  58.  
  59. if (id) players[0] = id; else get_players(players, count, "ch")
  60. {
  61. for (new i = 0; i < count; i++)
  62. {
  63. if (is_user_connected(players[i]))
  64. {
  65. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  66. write_byte(players[i])
  67. write_string(msg)
  68. message_end()
  69. }
  70. }
  71. }
  72. return PLUGIN_HANDLED
  73. }
  74.  

Szerző:  titkos [2014.02.26. 21:33 ]
Hozzászólás témája:  Re: Ez így jó?

theglorious írta:
Így kiírja chat ba és hudba is? :) Átalakításnál nincs hiba
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN "asd"
  5. #define VERSION "1.0"
  6. #define AUTHOR "asd"
  7.  
  8. new round
  9.  
  10. public plugin_init() {
  11. register_plugin(PLUGIN, VERSION, AUTHOR)
  12. register_logevent("round_start", 2, "1=Round_Start")
  13. register_event("TextMsg", "game_restart", "a", "2&#Game_C", "2&#Game_w")
  14. }
  15.  
  16.  
  17. public game_restart()
  18. {
  19. round = 0
  20. }
  21. public round_start(){
  22. new mapname[32]
  23. get_mapname(mapname, 31)
  24. round++
  25. if(round == 50){
  26. server_cmd("changelevel de_dust2")
  27. }
  28. print_color(0, "!gKör: !t%d!y/!t50 !y| !gPálya: !t%s !y| !gJátékosok: !t%d!y/!t%d !y| !t%d. !gkör elkezdődött, jó játékot!",round,mapname, get_playersnum(), get_maxplayers(), round)
  29. set_hudmessage(random(256), random(256), random(256), 0.29, 0.42,0,6.0,12.0,0.1,0.2)
  30. show_hudmessage(0, "%d. kör, jó játékot!", round)
  31. }
  32.  
  33. stock print_color(const id, const input[], any:...)
  34. {
  35. new count = 1, players[32]
  36. static msg[191]
  37. vformat(msg, 190, input, 3)
  38.  
  39. replace_all(msg, 190, "!g", "^4")
  40. replace_all(msg, 190, "!y", "^1")
  41. replace_all(msg, 190, "!t", "^3")
  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. replace_all(msg, 190, "Ö", "Ă–")
  56. replace_all(msg, 190, "Ő", "Ő")
  57. replace_all(msg, 190, "Ú", "Ăš")
  58. replace_all(msg, 190, "Ü", "Ăś")
  59. replace_all(msg, 190, "Ű", "Ű")
  60.  
  61. if (id) players[0] = id; else get_players(players, count, "ch")
  62. {
  63. for (new i = 0; i < count; i++)
  64. {
  65. if (is_user_connected(players[i]))
  66. {
  67. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  68. write_byte(players[i])
  69. write_string(msg)
  70. message_end()
  71. }
  72. }
  73. }
  74. return PLUGIN_HANDLED
  75. }
  76.  


Szteam jó ,de probáld ki

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