hlmod.hu
https://hlmod.hu/

Névre szoló kör üzenet !:)
https://hlmod.hu/viewtopic.php?f=29&t=14453
Oldal: 1 / 1

Szerző:  golden15 [ 2014.02.17. 17:26 ]
Hozzászólás témája:  Névre szoló kör üzenet !:)

Nem tudom ,hogy van-e már olyan plugin ,hogy a kör elején írja pl:(playername) Sok sikert! sok fraget ,ha még is van ,ak pls valaki az sma-t ,de ,ha nincsen,akkor pls valaki megírná nekem ? :). aki megcsinálja ,annak megy a gomb :)

Szerző:  anision [ 2014.02.17. 17:38 ]
Hozzászólás témája:  Re: Névre szoló kör üzenet !:)

Igazából, a névreszólóság azthiszem nem megoldható. Itt egy alap plugin.
SMA Forráskód: [ Mindet kijelol ]
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5.  
  6. #define PLUGIN "köreleje"
  7. #define VERSION "1.0"
  8. #define AUTHOR "anision @ clans.hu"
  9.  
  10. new kiirhatja
  11.  
  12. public plugin_init() {
  13. register_plugin(PLUGIN, VERSION, AUTHOR)
  14. register_logevent("kiir", 2, "1=Round_Start")
  15. kiirhatja = register_cvar("ani_kiirhatja", "1")
  16. }
  17.  
  18. public kiir(){
  19. if(get_pcvar_num(kiirhatja) == 1)
  20. {
  21. print_color(0,"!g[OldSchool] !y Sok sikert! Pálya: %s Játékosok: %d/%d", get_mapname, get_players,get_maxplayers)
  22. }
  23. }
  24.  
  25. stock print_color(const id, const input[], any:...)
  26. {
  27. new count = 1, players[32]
  28. static msg[191]
  29. vformat(msg, 190, input, 3)
  30.  
  31. replace_all(msg, 190, "!g", "^4")
  32. replace_all(msg, 190, "!y", "^1")
  33. replace_all(msg, 190, "!t", "^3")
  34. replace_all(msg, 190, "á", "á")
  35. replace_all(msg, 190, "é", "Ă©")
  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.  
  53. if (id) players[0] = id; else get_players(players, count, "ch")
  54. {
  55. for (new i = 0; i < count; i++)
  56. {
  57. if (is_user_connected(players[i]))
  58. {
  59. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  60. write_byte(players[i])
  61. write_string(msg)
  62. message_end()
  63. }
  64. }
  65. }
  66. return PLUGIN_HANDLED
  67. }
  68.  

Szerző:  golden15 [ 2014.02.17. 17:43 ]
Hozzászólás témája:  Re: Névre szoló kör üzenet !:)

Mondjuk ez nekem is megvan ..:// ,de nekem konkrétan az kellene ..://

Szerző:  Vinnice [ 2014.02.17. 17:50 ]
Hozzászólás témája:  Re: Névre szoló kör üzenet !:)

1. Spawnolásnál
[ablak]
SMA Forráskód: [ Mindet kijelol ]
  1.  
  2. #include < amxmodx >
  3. #include < amxmisc >
  4. #include < hamsandwich >
  5.  
  6. #define VERSION "0.0.1"
  7.  
  8. public plugin_init( ) {
  9. register_plugin( "Spawn Üzenet", VERSION, "#YouCantStopMe" );
  10.  
  11. RegisterHam( Ham_Spawn, "player", "fwd_PlayerSpawnPost", 1 );
  12. }
  13.  
  14. public fwd_PlayerSpawnPost( iClient )
  15. {
  16. if( is_user_alive( iClient ) )
  17. {
  18. new szName[32];
  19. get_user_name( iClient, szName, 31 );
  20.  
  21. print_color( iClient, "!g[ SzerverPrefix ] !t%s!y Sok sikert! sok fraget", szName );
  22. }
  23. }
  24.  
  25. stock print_color(const id, const input[], any:...)
  26. {
  27. new count = 1, players[32]
  28. static msg[191]
  29. vformat(msg, 190, input, 3)
  30.  
  31. replace_all(msg, 190, "!g", "^4")
  32. replace_all(msg, 190, "!y", "^1")
  33. replace_all(msg, 190, "!t", "^3")
  34. replace_all(msg, 190, "á", "á")
  35. replace_all(msg, 190, "é", "Ă©")
  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.  
  53. if (id) players[0] = id; else get_players(players, count, "ch")
  54. {
  55. for (new i = 0; i < count; i++)
  56. {
  57. if (is_user_connected(players[i]))
  58. {
  59. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  60. write_byte(players[i])
  61. write_string(msg)
  62. message_end()
  63. }
  64. }
  65. }
  66. return PLUGIN_HANDLED
  67. }
[/ablak]
2. Körkezdésnél
[ablak]
SMA Forráskód: [ Mindet kijelol ]
  1.  
  2. #include < amxmodx >
  3. #include < amxmisc >
  4.  
  5. #define VERSION "0.0.1"
  6.  
  7. public plugin_init( ) {
  8. register_plugin( "Körkezdési Üzenet", VERSION, "#YouCantStopMe" );
  9.  
  10. register_logevent( "eRoundStart", 2, "1=Round_Start" );
  11. }
  12.  
  13. public eRoundStart( )
  14. {
  15. new iPlayers[ 32 ], iNum, iClient, szName[ 32 ];
  16. get_players( iPlayers, iNum, "ch" )
  17. for( new i = 0; i < iNum; i++ )
  18. {
  19. get_user_name( iClient, szName, 31 );
  20.  
  21. print_color( iClient, "!g[ SzerverPrefix ] !t%s!y Sok sikert! sok fraget", szName );
  22. }
  23. }
  24.  
  25. stock print_color(const id, const input[], any:...)
  26. {
  27. new count = 1, players[32]
  28. static msg[191]
  29. vformat(msg, 190, input, 3)
  30.  
  31. replace_all(msg, 190, "!g", "^4")
  32. replace_all(msg, 190, "!y", "^1")
  33. replace_all(msg, 190, "!t", "^3")
  34. replace_all(msg, 190, "á", "á")
  35. replace_all(msg, 190, "é", "Ă©")
  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.  
  53. if (id) players[0] = id; else get_players(players, count, "ch")
  54. {
  55. for (new i = 0; i < count; i++)
  56. {
  57. if (is_user_connected(players[i]))
  58. {
  59. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  60. write_byte(players[i])
  61. write_string(msg)
  62. message_end()
  63. }
  64. }
  65. }
  66. return PLUGIN_HANDLED
  67. }
[/ablak]

Szerző:  xXlederXxHUN [ 2014.02.17. 17:50 ]
Hozzászólás témája:  Re: Névre szoló kör üzenet !:)

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN "köreleje"
  5. #define VERSION "1.0"
  6. #define AUTHOR "anision @ clans.hu"
  7.  
  8. new kiirhatja
  9.  
  10. public plugin_init() {
  11. register_plugin(PLUGIN, VERSION, AUTHOR)
  12. register_logevent("kiir", 2, "1=Round_Start")
  13. kiirhatja = register_cvar("ani_kiirhatja", "1")
  14. }
  15.  
  16. public kiir(){
  17. if(get_pcvar_num(kiirhatja) == 1)
  18. {
  19. print_color(0,"!g[OldSchool] !y Sok sikert %s! Pálya: %s Játékosok: %d/%d", get_user_name, get_mapname, get_players,get_maxplayers)
  20. }
  21. }
  22.  
  23. stock print_color(const id, const input[], any:...)
  24. {
  25. new count = 1, players[32]
  26. static msg[191]
  27. vformat(msg, 190, input, 3)
  28.  
  29. replace_all(msg, 190, "!g", "^4")
  30. replace_all(msg, 190, "!y", "^1")
  31. replace_all(msg, 190, "!t", "^3")
  32. replace_all(msg, 190, "á", "á")
  33. replace_all(msg, 190, "é", "Ă©")
  34. replace_all(msg, 190, "í", "Ă­")
  35. replace_all(msg, 190, "ó", "Ăł")
  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.  
  51. if (id) players[0] = id; else get_players(players, count, "ch")
  52. {
  53. for (new i = 0; i < count; i++)
  54. {
  55. if (is_user_connected(players[i]))
  56. {
  57. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  58. write_byte(players[i])
  59. write_string(msg)
  60. message_end()
  61. }
  62. }
  63. }
  64. return PLUGIN_HANDLED
  65. }

Szerző:  golden15 [ 2014.02.17. 18:25 ]
Hozzászólás témája:  Re: Névre szoló kör üzenet !:)

Am semmi bajom vele.. müködik ,de kicsit (nagyon )furcsa :(
4X írja ki a chatbe!+nem a nevet írja ki ,hanem a szerónevét.. :/
[GOLDEN] *GoLDeN K!V! GL-STAR@onhost.eu Sok sikert! sok fraget
[GOLDEN] *GoLDeN K!V! GL-STAR@onhost.eu Sok sikert! sok fraget
[GOLDEN] *GoLDeN K!V! GL-STAR@onhost.eu Sok sikert! sok fraget
[GOLDEN] *GoLDeN K!V! GL-STAR@onhost.eu Sok sikert! sok fraget
[GOLDEN] *GoLDeN K!V! GL-STAR@onhost.eu Sok sikert! sok fraget
így.. :/

Szerző:  Vinnice [ 2014.02.17. 18:44 ]
Hozzászólás témája:  Re: Névre szoló kör üzenet !:)

Próbáltad az elsővel is?

Javítva:
SMA Forráskód: [ Mindet kijelol ]
  1. #include < amxmodx >
  2. #include < amxmisc >
  3.  
  4. #define VERSION "0.0.1"
  5.  
  6. public plugin_init( ) {
  7. register_plugin( "Körkezdési Üzenet", VERSION, "#YouCantStopMe" );
  8.  
  9. register_logevent( "eRoundStart", 2, "1=Round_Start" );
  10. }
  11.  
  12. public eRoundStart( )
  13. {
  14. new iPlayers[ 32 ], iNum, iClient, szName[ 32 ];
  15. get_players( iPlayers, iNum, "ch" )
  16. for( new i = 0; i < iNum; i++ )
  17. {
  18. iClient = iPlayers[ i ];
  19.  
  20. get_user_name( iClient, szName, 31 );
  21.  
  22. print_color( iClient, "!g[ SzerverPrefix ] !t%s!y Sok sikert! sok fraget", szName );
  23. }
  24. }
  25.  
  26. stock print_color(const id, const input[], any:...)
  27. {
  28. new count = 1, players[32]
  29. static msg[191]
  30. vformat(msg, 190, input, 3)
  31.  
  32. replace_all(msg, 190, "!g", "^4")
  33. replace_all(msg, 190, "!y", "^1")
  34. replace_all(msg, 190, "!t", "^3")
  35. replace_all(msg, 190, "á", "á")
  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.  
  54. if (id) players[0] = id; else get_players(players, count, "ch")
  55. {
  56. for (new i = 0; i < count; i++)
  57. {
  58. if (is_user_connected(players[i]))
  59. {
  60. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  61. write_byte(players[i])
  62. write_string(msg)
  63. message_end()
  64. }
  65. }
  66. }
  67. return PLUGIN_HANDLED
  68. }

Szerző:  golden15 [ 2014.02.17. 18:47 ]
Hozzászólás témája:  Re: Névre szoló kör üzenet !:)

Vinnice írta:
Próbáltad az elsővel is?

Javítva:
SMA Forráskód: [ Mindet kijelol ]
  1. #include < amxmodx >
  2. #include < amxmisc >
  3.  
  4. #define VERSION "0.0.1"
  5.  
  6. public plugin_init( ) {
  7. register_plugin( "Körkezdési Üzenet", VERSION, "#YouCantStopMe" );
  8.  
  9. register_logevent( "eRoundStart", 2, "1=Round_Start" );
  10. }
  11.  
  12. public eRoundStart( )
  13. {
  14. new iPlayers[ 32 ], iNum, iClient, szName[ 32 ];
  15. get_players( iPlayers, iNum, "ch" )
  16. for( new i = 0; i < iNum; i++ )
  17. {
  18. iClient = iPlayers[ i ];
  19.  
  20. get_user_name( iClient, szName, 31 );
  21.  
  22. print_color( iClient, "!g[ SzerverPrefix ] !t%s!y Sok sikert! sok fraget", szName );
  23. }
  24. }
  25.  
  26. stock print_color(const id, const input[], any:...)
  27. {
  28. new count = 1, players[32]
  29. static msg[191]
  30. vformat(msg, 190, input, 3)
  31.  
  32. replace_all(msg, 190, "!g", "^4")
  33. replace_all(msg, 190, "!y", "^1")
  34. replace_all(msg, 190, "!t", "^3")
  35. replace_all(msg, 190, "á", "á")
  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.  
  54. if (id) players[0] = id; else get_players(players, count, "ch")
  55. {
  56. for (new i = 0; i < count; i++)
  57. {
  58. if (is_user_connected(players[i]))
  59. {
  60. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  61. write_byte(players[i])
  62. write_string(msg)
  63. message_end()
  64. }
  65. }
  66. }
  67. return PLUGIN_HANDLED
  68. }

Ja próbáltam ,de az is úgyan ezt csinálja.. :// nem írja a nevet sem meg 4x szer írja.. ://

Szerző:  ultraibolya [ 2014.02.18. 21:32 ]
Hozzászólás témája:  Re: Névre szoló kör üzenet !:)

ezért mert %s-t raksz a print-be nem kéri le a nevét :)

SMA Forráskód: [ Mindet kijelol ]
  1. new nevtarolo[33]
  2. get_user_name(id,nevtarolo,charsmax(nevtarolo))


xXlederXxHUN írta:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN "köreleje"
  5. #define VERSION "1.0"
  6. #define AUTHOR "anision @ clans.hu"
  7.  
  8. new kiirhatja
  9.  
  10. public plugin_init() {
  11. register_plugin(PLUGIN, VERSION, AUTHOR)
  12. register_logevent("kiir", 2, "1=Round_Start")
  13. kiirhatja = register_cvar("ani_kiirhatja", "1")
  14. }
  15.  
  16. public kiir(){
  17. if(get_pcvar_num(kiirhatja) == 1)
  18. {
  19. print_color(0,"!g[OldSchool] !y Sok sikert %s! Pálya: %s Játékosok: %d/%d", get_user_name, get_mapname, get_players,get_maxplayers)
  20. }
  21. }
  22.  
  23. stock print_color(const id, const input[], any:...)
  24. {
  25. new count = 1, players[32]
  26. static msg[191]
  27. vformat(msg, 190, input, 3)
  28.  
  29. replace_all(msg, 190, "!g", "^4")
  30. replace_all(msg, 190, "!y", "^1")
  31. replace_all(msg, 190, "!t", "^3")
  32. replace_all(msg, 190, "á", "á")
  33. replace_all(msg, 190, "é", "Ă©")
  34. replace_all(msg, 190, "í", "Ă­")
  35. replace_all(msg, 190, "ó", "Ăł")
  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.  
  51. if (id) players[0] = id; else get_players(players, count, "ch")
  52. {
  53. for (new i = 0; i < count; i++)
  54. {
  55. if (is_user_connected(players[i]))
  56. {
  57. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  58. write_byte(players[i])
  59. write_string(msg)
  60. message_end()
  61. }
  62. }
  63. }
  64. return PLUGIN_HANDLED
  65. }

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