hlmod.hu
https://hlmod.hu/

Antirush HUD Üzenet
https://hlmod.hu/viewtopic.php?f=29&t=5855
Oldal: 2 / 2

Szerző:  VirTuaL ~` [ 2012.09.08. 12:07 ]
Hozzászólás témája:  Re: Antirush HUD Üzenet

HunGamer-é javítva:

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4.  
  5. #define PLUGIN "Rush hud info"
  6. #define AUTHOR "expert"
  7. #define VERSION "1.0"
  8.  
  9. new szamlalo
  10.  
  11. public plugin_init()
  12. {
  13. register_plugin(PLUGIN, VERSION, AUTHOR)
  14. register_logevent("start",2,"1=Round_Start")
  15. register_event("DeathMsg", "Death", "a")
  16. register_logevent("bomba", 3, "2=Planted_The_Bomb")
  17. }
  18. public start()
  19. {
  20. set_task(0.1, "kiiras")
  21. szamlalo = 60
  22. }
  23. public kiiras()
  24. {
  25. new players[32], pnum, tempid;
  26. get_players(players, pnum, "c");
  27. for(new i; i<pnum; i++)
  28. {
  29. tempid = players[i];
  30. if(is_user_alive(tempid) && cs_get_user_team(tempid) == CS_TEAM_CT)
  31. {
  32. if(szamlalo > 0)
  33. {
  34. set_hudmessage(000, 255, 000, -1.0, 0.30, 0, 0.0, 1.1, 0.0, 0.0, -1)
  35. show_hudmessage(tempid, "Rusholas mehet %d masodperc mulva!!", szamlalo)
  36. set_task(1.0, "kiiras")
  37. }
  38. else
  39. {
  40. set_hudmessage(000, 255, 000, -1.0, 0.30, 0, 0.0, 1.1, 0.0, 0.0, -1)
  41. show_hudmessage(tempid, "Most mehet a Rush!")
  42. return PLUGIN_HANDLED
  43. }
  44. }
  45. }
  46. --szamlalo
  47. return PLUGIN_CONTINUE
  48. }
  49. public Death()
  50. {
  51. new tplayers[32], tpnum
  52. get_players(tplayers, tpnum, "aceh", "TERRORIST")
  53.  
  54. new ctplayers[32], ctpnum
  55. get_players(ctplayers, ctpnum, "aceh", "CT")
  56.  
  57. if(tpnum == 1 || ctpnum == 1)
  58. {
  59. szamlalo = 0
  60. }
  61.  
  62. return PLUGIN_CONTINUE
  63. }
  64. public bomba()
  65. {
  66. szamlalo = 0
  67. }

Szerző:  HunGamer [ 2012.09.08. 12:20 ]
Hozzászólás témája:  Re: Antirush HUD Üzenet

Silent írta:
Egyik sem jó. HunGamernek:

Kör indul, számláló 60. Lefut a kiírás, és számláló 59. A task újra elindítja a funkciót, így számláló 60 lesz. Ördögi kör.

Igaz. Ezt elnéztem :)

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