hlmod.hu
https://hlmod.hu/

Hud koordinatat vki
https://hlmod.hu/viewtopic.php?f=29&t=9935
Oldal: 1 / 1

Szerző:  alfanero [ 2013.08.07. 13:38 ]
Hozzászólás témája:  Hud koordinatat vki

Hello valaki tuna nekem ehezz HUD koordinatat irni?
nagyjabol Koözépen és NAGYbEtükkel legyen!

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(0,255,0,0.18,0.0,0,6.0,12.0,0.1,0.2)
  53. show_hudmessage(0, "1; %s^n2; %s^n 3; %s", top1neve, top2neve, top3neve)
  54. client_print(0, print_chat, "Ebben a Korben a Legjobb jatekosok: %s %s %s", top1neve, top2neve, top3neve)
  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.  

Szerző:  Vinnice [ 2013.08.07. 14:00 ]
Hozzászólás témája:  Re: Hud koordinatat vki

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(0,255,0,0.29, 0.42,0,6.0,12.0,0.1,0.2)
  54. show_dhudmessage(0, "1; %s^n2; %s^n 3; %s", top1neve, top2neve, top3neve)
  55. client_print(0, print_chat, "Ebben a Korben a Legjobb jatekosok: %s %s %s", top1neve, top2neve, top3neve)
  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. } 

dhudmessage.inc kell hozzá

Szerző:  alfanero [ 2013.08.07. 16:33 ]
Hozzászólás témája:  Re: Hud koordinatat vki

A 2.sma-s forraskoddal mit csainaljak?

Szerző:  CrB [ 2013.08.07. 18:46 ]
Hozzászólás témája:  Re: Hud koordinatat vki

alfanero írta:
A 2.sma-s forraskoddal mit csainaljak?


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

A 2. szerintem te az aláírására gondolsz ami a kis vonal alatt van azzal semmit :) nem éri meg betenni :D

Szerző:  alfanero [ 2013.08.07. 19:01 ]
Hozzászólás témája:  Re: Hud koordinatat vki

Köszi de már nem kell megvan :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/