hlmod.hu
https://hlmod.hu/

Hud
https://hlmod.hu/viewtopic.php?f=9&t=7987
Oldal: 1 / 1

Szerző:  pixxa112 [2013.04.02. 16:34 ]
Hozzászólás témája:  Hud

Hali.

Valaki bele tudja írni, hogy az adminokat is írja?
Mert a steamosokat se mutatja.
Admin: 0 <-- Így írja :(

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2.  
  3. #include <amxmisc>
  4.  
  5.  
  6.  
  7. #define PLUGIN "Hud-General Messages"
  8.  
  9. #define VERSION "1.0"
  10.  
  11. #define AUTHOR "pixxa112"
  12.  
  13.  
  14.  
  15. new admins;
  16.  
  17. new kor;
  18.  
  19.  
  20.  
  21. public plugin_init()
  22.  
  23. {
  24.  
  25. register_plugin(PLUGIN, VERSION, AUTHOR)
  26.  
  27. set_task(1.0, "show_time",0,"",0,"b")
  28.  
  29. register_logevent("logevent_round_start", 2, "1=Round_Start")
  30.  
  31. }
  32.  
  33.  
  34.  
  35. public logevent_round_start()
  36.  
  37. {
  38.  
  39. kor++;
  40.  
  41. }
  42.  
  43.  
  44.  
  45. public client_connect(id)
  46.  
  47. {
  48.  
  49. if(get_user_flags(id) & ADMIN_KICK)
  50.  
  51. {
  52.  
  53. admins++
  54.  
  55. }
  56.  
  57. }
  58.  
  59.  
  60.  
  61. public client_disconnect(id)
  62.  
  63. {
  64.  
  65. if(get_user_flags(id) & ADMIN_KICK)
  66.  
  67. {
  68.  
  69. admins--
  70.  
  71. }
  72.  
  73. }
  74.  
  75.  
  76.  
  77. public show_time()
  78.  
  79. {
  80.  
  81. new ido[9]
  82.  
  83. new palya [50]
  84.  
  85.  
  86.  
  87. get_time("%H:%M:%S",ido,8)
  88.  
  89. get_mapname(palya, 49)
  90.  
  91.  
  92.  
  93. new ping, loss
  94.  
  95. new players[32], pnum, tempid
  96.  
  97. get_players(players, pnum, "c");
  98.  
  99.  
  100.  
  101. for(new i; i<pnum; i++)
  102.  
  103. {
  104.  
  105. tempid = players[i]
  106.  
  107. get_user_ping(tempid, ping, loss)
  108.  
  109. set_hudmessage(0, 255, 255, 0.0, 0.2, 0, 6.0, 12.0)
  110.  
  111. show_hudmessage(tempid, "Idő: %s^nPálya: %s^nKör: %d^nJátékosok: %d/%d^nAdmins: %d^nPing: %d%^nfb.com/justknife", ido, palya, kor, pnum, get_maxplayers(), admins, ping)
  112.  
  113. }
  114.  
  115. }

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