hlmod.hu
https://hlmod.hu/

Hud | Admin,Frag,Player,Ido,Datum - JAVÍTÁS!
https://hlmod.hu/viewtopic.php?f=9&t=19832
Oldal: 1 / 1

Szerző:  D3M0*~ [2015.03.10. 19:33 ]
Hozzászólás témája:  Hud | Admin,Frag,Player,Ido,Datum - JAVÍTÁS!

Sziasztok,ezt nézze már meg nekem valaki,miért nem jó :o :D
És ha az admin mutatás része rosszul van beleírva azt is javítsátok köszönöm :$

FORRÁSKÓD
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <dhudmessage>
  5.  
  6. #define PLUGIN "HUD Info"
  7. #define VERSION "1.0"
  8. #define AUTHOR "N/A"
  9.  
  10. #define MAXROUNDS 40
  11.  
  12. new Rounds
  13. new iCTKills
  14. new iTTKills
  15. new admin
  16.  
  17. public plugin_init() {
  18. register_plugin(PLUGIN, VERSION, AUTHOR)
  19. register_event( "DeathMsg", "DeathEvent", "a" );
  20. register_event("TextMsg","ResetAll","a","2&#Game_C","2&#Game_w")
  21. register_logevent("NewRounds", 2, "0=World triggered", "1=Round_Start")
  22. set_task(1.0,"HUDInfo" , _ , _ , _ , "b")
  23. }
  24.  
  25. public ResetAll() {
  26. Rounds = 0
  27. iCTKills = 0
  28. iTTKills = 0
  29. }
  30.  
  31. public DeathEvent(){
  32. new Killer = read_data( 1 );
  33. new CsTeams:Team
  34. Team = cs_get_user_team( Killer );
  35. if (Team == CS_TEAM_T)
  36. {
  37. iTTKills++
  38. }
  39. if (Team == CS_TEAM_CT)
  40. {
  41. iCTKills++
  42. }
  43. }
  44.  
  45. public NewRounds(){
  46. Rounds++
  47. }
  48.  
  49. public HUDInfo(){
  50. {
  51. if(is_user_alive(id))
  52. {
  53. return PLUGIN_HANDLED;
  54. }
  55. admin = 0;
  56. new players[32], pnum, tempid
  57. get_players(players, pnum, "c")
  58.  
  59. for( new i; i<pnum; i++ )
  60. {
  61. tempid = players[i]
  62. if(get_user_flags(tempid) & ADMIN_KICK)
  63. {
  64. admin++;
  65. }
  66. new ido[64], datum[64]
  67. get_time("%H:%M:%S", ido, 63)
  68. get_time("%Y.%m.%d", datum, 63)
  69. new fentlevo = get_playersnum();
  70. new maxplay = get_maxplayers();
  71.  
  72. set_dhudmessage(random(255),random(255),random(255), 0.0, 0.19, 0, 6.0, 12.0)
  73. show_dhudmessage(0, "Adminok: %dTe Fragok: %d^nCt Fragok: %d^nJatekosok: %d/%d^nIdo: %s^nDatum: %s", admin, iTTKills, iCTKills, fentlevo, maxplay, ido, datum)
  74. }
  75.  
  76. }
  77. }

Megy a gomb természetesen!

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