hlmod.hu
https://hlmod.hu/

Dupla freg
https://hlmod.hu/viewtopic.php?f=9&t=7683
Oldal: 1 / 2

Szerző:  pixxa112 [2013.03.12. 14:27 ]
Hozzászólás témája:  Dupla freg

Hali.

Valaki be tudná írni, hogy a dubla freg csak 16:00-tól 18:00-ig tartson.
+írjon egy üzenetet a chatbe, hogy: ezen a szerveren fút a Dupla freg plugin.
Előre is köszi.

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <fun>
  5.  
  6. #define PLUGIN "Dupla Frag"
  7. #define VERSION "1.0"
  8. #define AUTHOR "RaZzoR"
  9.  
  10. new toggle;
  11.  
  12. public plugin_init()
  13. {
  14. register_plugin(PLUGIN, VERSION, AUTHOR);
  15. register_event("DeathMsg","hook_death","a");
  16. toggle = register_cvar("df_enabled","1");
  17.  
  18. }
  19.  
  20. public hook_death()
  21. {
  22. if(get_pcvar_num(toggle) != 1)
  23. return PLUGIN_HANDLED;
  24. new killer = read_data(1);
  25. new victim = read_data(2);
  26.  
  27. if(get_user_team(killer) != get_user_team(victim))
  28. {
  29. inc_frag(killer);
  30. }
  31.  
  32. return PLUGIN_HANDLED;
  33. }
  34.  
  35. inc_frag(index)
  36. {
  37. if(!is_user_connected(index)) return;
  38. set_user_frags(index,get_user_frags(index)+1);
  39. }

Szerző:  small [2013.03.12. 14:30 ]
Hozzászólás témája:  Re: Dupla freg

frag*

Meg 1000 ilyen téma volt már...

Szerző:  theglorious [2013.03.12. 15:43 ]
Hozzászólás témája:  Re: Dupla freg

viewtopic.php?f=29&t=6545

Szerző:  m0csy652 [2013.03.12. 20:43 ]
Hozzászólás témája:  Re: Dupla freg

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2.  
  3. #include <amxmisc>
  4.  
  5. #include <fun>
  6.  
  7. #include <dhudmessage>
  8.  
  9.  
  10.  
  11. #define PLUGIN "New Plug-In"
  12.  
  13. #define VERSION "1.0"
  14.  
  15. #define AUTHOR "HunGamer"
  16.  
  17.  
  18.  
  19. new bool:aktiv = false;
  20.  
  21.  
  22.  
  23. public plugin_init()
  24.  
  25. {
  26.  
  27. register_plugin(PLUGIN, VERSION, AUTHOR);
  28.  
  29. register_event("DeathMsg","hook_death","a");
  30.  
  31. set_task(60.0, "check", 0, _, _, "b");
  32.  
  33. set_task(60.0*30, "hirdet", 0, _, _, "b")
  34.  
  35. }
  36.  
  37. public check()
  38.  
  39. {
  40.  
  41. new hour, minute, second;
  42.  
  43. time(hour, minute, second);
  44.  
  45.  
  46.  
  47. if(16 <= hour || hour <= 18)
  48.  
  49. aktiv = true;
  50.  
  51. else
  52.  
  53. aktiv = false;
  54.  
  55.  
  56.  
  57. return PLUGIN_CONTINUE;
  58.  
  59. }
  60.  
  61.  
  62.  
  63. public hook_death()
  64.  
  65. {
  66.  
  67. if(!aktiv)
  68.  
  69. return PLUGIN_CONTINUE;
  70.  
  71.  
  72.  
  73. new killer = read_data(1);
  74.  
  75. set_user_frags(killer, get_user_frags(killer) + 1);
  76.  
  77.  
  78.  
  79. new frags = get_user_frags(killer)
  80.  
  81. new death = get_user_deaths(killer)
  82.  
  83. new team = get_user_team(killer)
  84.  
  85.  
  86.  
  87. message_begin(MSG_ALL, get_user_msgid("ScoreInfo"), {0,0,0}, 0)
  88.  
  89. write_byte(killer)
  90.  
  91. write_short(frags)
  92.  
  93. write_short(death)
  94.  
  95. write_short(0)
  96.  
  97. write_short(team)
  98.  
  99. message_end()
  100.  
  101.  
  102.  
  103. return PLUGIN_CONTINUE;
  104.  
  105. }
  106.  
  107. public hirdet()
  108.  
  109. {
  110.  
  111. if(!aktiv)
  112.  
  113. {
  114.  
  115. set_dhudmessage(255, 255, 255, -1.0, 0.20, 0, 12.0)
  116.  
  117. show_dhudmessage(0, "Delutan 4tol Este 6-ig Dupla Frag osztas van !!")
  118.  
  119. }
  120.  
  121. return PLUGIN_CONTINUE;
  122.  
  123. }

Szerző:  pixxa112 [2013.03.12. 20:47 ]
Hozzászólás témája:  Re: Dupla freg

m0csy652 írta:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2.  
  3. #include <amxmisc>
  4.  
  5. #include <fun>
  6.  
  7. #include <dhudmessage>
  8.  
  9.  
  10.  
  11. #define PLUGIN "New Plug-In"
  12.  
  13. #define VERSION "1.0"
  14.  
  15. #define AUTHOR "HunGamer"
  16.  
  17.  
  18.  
  19. new bool:aktiv = false;
  20.  
  21.  
  22.  
  23. public plugin_init()
  24.  
  25. {
  26.  
  27. register_plugin(PLUGIN, VERSION, AUTHOR);
  28.  
  29. register_event("DeathMsg","hook_death","a");
  30.  
  31. set_task(60.0, "check", 0, _, _, "b");
  32.  
  33. set_task(60.0*30, "hirdet", 0, _, _, "b")
  34.  
  35. }
  36.  
  37. public check()
  38.  
  39. {
  40.  
  41. new hour, minute, second;
  42.  
  43. time(hour, minute, second);
  44.  
  45.  
  46.  
  47. if(16 <= hour || hour <= 18)
  48.  
  49. aktiv = true;
  50.  
  51. else
  52.  
  53. aktiv = false;
  54.  
  55.  
  56.  
  57. return PLUGIN_CONTINUE;
  58.  
  59. }
  60.  
  61.  
  62.  
  63. public hook_death()
  64.  
  65. {
  66.  
  67. if(!aktiv)
  68.  
  69. return PLUGIN_CONTINUE;
  70.  
  71.  
  72.  
  73. new killer = read_data(1);
  74.  
  75. set_user_frags(killer, get_user_frags(killer) + 1);
  76.  
  77.  
  78.  
  79. new frags = get_user_frags(killer)
  80.  
  81. new death = get_user_deaths(killer)
  82.  
  83. new team = get_user_team(killer)
  84.  
  85.  
  86.  
  87. message_begin(MSG_ALL, get_user_msgid("ScoreInfo"), {0,0,0}, 0)
  88.  
  89. write_byte(killer)
  90.  
  91. write_short(frags)
  92.  
  93. write_short(death)
  94.  
  95. write_short(0)
  96.  
  97. write_short(team)
  98.  
  99. message_end()
  100.  
  101.  
  102.  
  103. return PLUGIN_CONTINUE;
  104.  
  105. }
  106.  
  107. public hirdet()
  108.  
  109. {
  110.  
  111. if(!aktiv)
  112.  
  113. {
  114.  
  115. set_dhudmessage(255, 255, 255, -1.0, 0.20, 0, 12.0)
  116.  
  117. show_dhudmessage(0, "Delutan 4tol Este 6-ig Dupla Frag osztas van !!")
  118.  
  119. }
  120.  
  121. return PLUGIN_CONTINUE;
  122.  
  123. }


Nekem a chatbe kéne hogy írja.

Szerző:  small [2013.03.12. 20:49 ]
Hozzászólás témája:  Re: Dupla freg

SMA Forráskód: [ Mindet kijelol ]
  1. client_print(id,print_chat,"ezen a szerveren fút a Dupla freg plugin.")

Szerző:  barcasl3 [2013.03.12. 20:51 ]
Hozzászólás témája:  Re: Dupla freg

Kiégett a szemem. FUT!!!! és nem fút....

Szerző:  small [2013.03.12. 20:52 ]
Hozzászólás témája:  Re: Dupla freg

barcasl3 írta:
Kiégett a szemem. FUT!!!! és nem fút....

Én csak azt írtam oda amit kért....

Szerző:  barcasl3 [2013.03.12. 20:53 ]
Hozzászólás témája:  Re: Dupla freg

small írta:
barcasl3 írta:
Kiégett a szemem. FUT!!!! és nem fút....

Én csak azt írtam oda amit kért....

Jaaaj, nem neked írtam!:D

Szerző:  pixxa112 [2013.03.12. 21:24 ]
Hozzászólás témája:  Re: Dupla freg

m0csy652 írta:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2.  
  3. #include <amxmisc>
  4.  
  5. #include <fun>
  6.  
  7. #include <dhudmessage>
  8.  
  9.  
  10.  
  11. #define PLUGIN "New Plug-In"
  12.  
  13. #define VERSION "1.0"
  14.  
  15. #define AUTHOR "HunGamer"
  16.  
  17.  
  18.  
  19. new bool:aktiv = false;
  20.  
  21.  
  22.  
  23. public plugin_init()
  24.  
  25. {
  26.  
  27. register_plugin(PLUGIN, VERSION, AUTHOR);
  28.  
  29. register_event("DeathMsg","hook_death","a");
  30.  
  31. set_task(60.0, "check", 0, _, _, "b");
  32.  
  33. set_task(60.0*30, "hirdet", 0, _, _, "b")
  34.  
  35. }
  36.  
  37. public check()
  38.  
  39. {
  40.  
  41. new hour, minute, second;
  42.  
  43. time(hour, minute, second);
  44.  
  45.  
  46.  
  47. if(16 <= hour || hour <= 18)
  48.  
  49. aktiv = true;
  50.  
  51. else
  52.  
  53. aktiv = false;
  54.  
  55.  
  56.  
  57. return PLUGIN_CONTINUE;
  58.  
  59. }
  60.  
  61.  
  62.  
  63. public hook_death()
  64.  
  65. {
  66.  
  67. if(!aktiv)
  68.  
  69. return PLUGIN_CONTINUE;
  70.  
  71.  
  72.  
  73. new killer = read_data(1);
  74.  
  75. set_user_frags(killer, get_user_frags(killer) + 1);
  76.  
  77.  
  78.  
  79. new frags = get_user_frags(killer)
  80.  
  81. new death = get_user_deaths(killer)
  82.  
  83. new team = get_user_team(killer)
  84.  
  85.  
  86.  
  87. message_begin(MSG_ALL, get_user_msgid("ScoreInfo"), {0,0,0}, 0)
  88.  
  89. write_byte(killer)
  90.  
  91. write_short(frags)
  92.  
  93. write_short(death)
  94.  
  95. write_short(0)
  96.  
  97. write_short(team)
  98.  
  99. message_end()
  100.  
  101.  
  102.  
  103. return PLUGIN_CONTINUE;
  104.  
  105. }
  106.  
  107. public hirdet()
  108.  
  109. {
  110.  
  111. if(!aktiv)
  112.  
  113. {
  114.  
  115. set_dhudmessage(255, 255, 255, -1.0, 0.20, 0, 12.0)
  116.  
  117. show_dhudmessage(0, "Delutan 4tol Este 6-ig Dupla Frag osztas van !!")
  118.  
  119. }
  120.  
  121. return PLUGIN_CONTINUE;
  122.  
  123. }


A dupla frag megy, de az idő az nem jó.
még 7 óra után is dupla frag megy.

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