hlmod.hu
https://hlmod.hu/

Hud Plugin
https://hlmod.hu/viewtopic.php?f=29&t=14507
Oldal: 1 / 1

Szerző:  ReFlex [2014.02.21. 16:04 ]
Hozzászólás témája:  Hud Plugin

Hali! Szeretnék kérni 1 olyan plugint ami kiírja a hudban a következőket:
Játékosok
Idő
Hátralévő idő

Szerző:  Golo [2014.02.21. 16:18 ]
Hozzászólás témája:  Re: Hud Plugin

Teszt nem volt :)
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <cstrike>
  3.  
  4. #define PLUGIN "HUD Info"
  5. #define VERSION "1.0"
  6. #define AUTHOR "Golo"
  7.  
  8. public plugin_init() {
  9. register_plugin(PLUGIN, VERSION, AUTHOR)
  10. register_event("TextMsg","ResetAll","a","2&#Game_C","2&#Game_w")
  11. set_task(1.0,"HUDInfo" , _ , _ , _ , "b")
  12.  
  13. }
  14.  
  15. public HUDInfo(id){
  16.  
  17. new CurrentPlayers = get_playersnum();
  18. new MaxPlayers = get_maxplayers();
  19.  
  20. new Time[15]
  21. get_time("%H:%M",Time,14)
  22.  
  23. new Ido = get_timeleft()
  24.  
  25. set_hudmessage(random(256), random(256), random(256), 0.0, 0.17, 0, 6.0, 1.0)
  26. show_hudmessage(id, "Játékosok: %d/%d^nIdő‘: %s^nHátralévő Idő: %d:%02d", CurrentPlayers, MaxPlayers, Time, (Ido / 60), (Ido % 60))
  27.  
  28. }
  29.  
  30. stock print_color(const id, const input[], any:...)
  31. {
  32. new count = 1, players[32]
  33. static msg[191]
  34. vformat(msg, 190, input, 3)
  35.  
  36. replace_all(msg, 190, "!g", "^4")
  37. replace_all(msg, 190, "!y", "^1")
  38. replace_all(msg, 190, "!t", "^3")
  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. replace_all(msg, 190, "Ü", "Ăś")
  56. replace_all(msg, 190, "Ű", "Ű")
  57.  
  58. if (id) players[0] = id; else get_players(players, count, "ch")
  59. {
  60. for (new i = 0; i < count; i++)
  61. {
  62. if (is_user_connected(players[i]))
  63. {
  64. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  65. write_byte(players[i])
  66. write_string(msg)
  67. message_end()
  68. }
  69. }
  70. }
  71. return PLUGIN_HANDLED
  72. }
  73.  

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