hlmod.hu
https://hlmod.hu/

Rank kiszedése pluginból
https://hlmod.hu/viewtopic.php?f=9&t=19330
Oldal: 1 / 1

Szerző:  Be$t.# [2015.02.04. 20:12 ]
Hozzászólás témája:  Rank kiszedése pluginból

csááó.
Valaki ebből ki szedné a rankot?
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <engine>
  4. #include <cstrike>
  5. #include <csstats>
  6.  
  7.  
  8. #define PLUGIN "infomacio"
  9. #define VERSION "1.0"
  10. #define AUTHOR "asd"
  11.  
  12. new ctfrags = 0
  13. new tfrags = 0
  14. new stats[8]
  15. new bodyhits[8]
  16. new irank
  17.  
  18.  
  19.  
  20. public plugin_init() {
  21.  
  22. register_plugin(PLUGIN, VERSION, AUTHOR)
  23. register_event("DeathMsg", "halal", "a");
  24. register_logevent("round_first", 2, "0=World triggered", "1&Restart_Round_")
  25. register_logevent("round_first", 2, "0=World triggered", "1=Game_Commencing")
  26.  
  27. set_task(5.0, "hud")
  28.  
  29. }
  30.  
  31.  
  32.  
  33. public round_first()
  34.  
  35. ctfrags = 0, tfrags = 0
  36.  
  37.  
  38.  
  39. public halal()
  40.  
  41. {
  42.  
  43. static killer
  44.  
  45. killer = read_data(1);
  46.  
  47. if(get_user_team(killer) == 2)
  48.  
  49. ctfrags++
  50.  
  51. if(get_user_team(killer) == 1)
  52.  
  53. tfrags++
  54.  
  55. return PLUGIN_CONTINUE
  56.  
  57. }
  58.  
  59.  
  60.  
  61. public hud(id) {
  62. irank = get_user_stats(id,stats,bodyhits)
  63. new mrank = get_statsnum()
  64.  
  65. set_hudmessage(0, 102, 204, 0.01, 0.15, 0, 0.6, 5.0)
  66. show_hudmessage(id, "Slot %d/%d^n CT frag: %d^nT frag: %d ^nRankod: %d/%d", get_playersnum(), get_maxplayers(), ctfrags, tfrags, irank, mrank)
  67. set_task(5.0, "hud")
  68.  
  69. }

Szerző:  Hibrid [2015.02.04. 20:15 ]
Hozzászólás témája:  Re: HUD

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <engine>
  4. #include <cstrike>
  5. // #include <csstats>
  6.  
  7.  
  8. #define PLUGIN "infomacio"
  9. #define VERSION "1.0"
  10. #define AUTHOR "asd"
  11.  
  12. new ctfrags = 0
  13. new tfrags = 0
  14. // new stats[8]
  15. // new bodyhits[8]
  16. // new irank
  17.  
  18.  
  19.  
  20. public plugin_init() {
  21.  
  22. register_plugin(PLUGIN, VERSION, AUTHOR)
  23. register_event("DeathMsg", "halal", "a");
  24. register_logevent("round_first", 2, "0=World triggered", "1&Restart_Round_")
  25. register_logevent("round_first", 2, "0=World triggered", "1=Game_Commencing")
  26.  
  27. set_task(5.0, "hud")
  28.  
  29. }
  30.  
  31.  
  32.  
  33. public round_first()
  34.  
  35. ctfrags = 0, tfrags = 0
  36.  
  37.  
  38.  
  39. public halal()
  40.  
  41. {
  42.  
  43. static killer
  44.  
  45. killer = read_data(1);
  46.  
  47. if(get_user_team(killer) == 2)
  48.  
  49. ctfrags++
  50.  
  51. if(get_user_team(killer) == 1)
  52.  
  53. tfrags++
  54.  
  55. return PLUGIN_CONTINUE
  56.  
  57. }
  58.  
  59.  
  60.  
  61. public hud(id) {
  62. // irank = get_user_stats(id,stats,bodyhits)
  63. // new mrank = get_statsnum()
  64.  
  65. set_hudmessage(0, 102, 204, 0.01, 0.15, 0, 0.6, 5.0)
  66. show_hudmessage(id, "Slot %d/%d^n CT frag: %d^nT frag: %d ", get_playersnum(), get_maxplayers(), ctfrags, tfrags)
  67. set_task(5.0, "hud")
  68. }

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