hlmod.hu
https://hlmod.hu/

Dupla frag idő közönként!
https://hlmod.hu/viewtopic.php?f=29&t=10106
Oldal: 1 / 1

Szerző:  Painci [ 2013.08.12. 12:40 ]
Hozzászólás témája:  Dupla frag idő közönként!

Hali.

Kéne egy olyan plugin amivel dupla frag lenne a szerveremen reggel 6 (6:00) és 8 (8:00) között és utánna este 8 (20:00) és éjfél (0:00) között.
Köszi szépen, ha tudtál segíteni megy a gomb :D

Szerző:  HuBaBuBa [ 2013.08.12. 12:58 ]
Hozzászólás témája:  Re: Dupla frag idő közönként!

Dupla frag idönként

Szerző:  Painci [ 2013.08.12. 13:03 ]
Hozzászólás témája:  Re: Dupla frag idő közönként!

HuBaBuBa írta:
https://hlmod.hu/viewtopic.php?f=29&t=8975

De nekem az kéne, hogy 6:00 -tól 8:00-ig utánna áljon le megint rendes frag lenne utánna 20:00-tól 23:00-ig legyen

Szerző:  ultraibolya [ 2013.08.12. 13:08 ]
Hozzászólás témája:  Re: Dupla frag idő közönként!

Próba nem volt


SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fun>
  4.  
  5.  
  6. #define PLUGIN "New Plug-In"
  7. #define VERSION "1.0"
  8. #define AUTHOR "HunGamer"
  9.  
  10. new bool:aktiv = false;
  11.  
  12. public plugin_init()
  13. {
  14. register_plugin(PLUGIN, VERSION, AUTHOR);
  15. register_event("DeathMsg","hook_death","a");
  16. set_task(60.0, "check", 0, _, _, "b");
  17. }
  18. public check()
  19. {
  20. new hour, minute, second;
  21. time(hour, minute, second);
  22. if(20 <= hour || hour <=23)
  23. aktiv=true
  24. else
  25. aktiv=false
  26.  
  27. if(6 <= hour || hour <= 8)
  28. aktiv = true;
  29. else
  30. aktiv = false;
  31.  
  32. return PLUGIN_HANDLED;
  33. }
  34. public hook_death()
  35. {
  36. if(!aktiv)
  37. return PLUGIN_CONTINUE;
  38.  
  39. new killer = read_data(1);
  40. set_user_frags(killer, get_user_frags(killer) + 1);
  41.  
  42. return PLUGIN_CONTINUE;
  43.  
  44. }

Szerző:  HuBaBuBa [ 2013.08.12. 13:50 ]
Hozzászólás témája:  Re: Dupla frag idő közönként!

ultraibolya írta:
Próba nem volt


SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fun>
  4.  
  5.  
  6. #define PLUGIN "New Plug-In"
  7. #define VERSION "1.0"
  8. #define AUTHOR "HunGamer"
  9.  
  10. new bool:aktiv = false;
  11.  
  12. public plugin_init()
  13. {
  14. register_plugin(PLUGIN, VERSION, AUTHOR);
  15. register_event("DeathMsg","hook_death","a");
  16. set_task(60.0, "check", 0, _, _, "b");
  17. }
  18. public check()
  19. {
  20. new hour, minute, second;
  21. time(hour, minute, second);
  22. if(20 <= hour || hour <=23)
  23. aktiv=true
  24. else
  25. aktiv=false
  26.  
  27. if(6 <= hour || hour <= 8)
  28. aktiv = true;
  29. else
  30. aktiv = false;
  31.  
  32. return PLUGIN_HANDLED;
  33. }
  34. public hook_death()
  35. {
  36. if(!aktiv)
  37. return PLUGIN_CONTINUE;
  38.  
  39. new killer = read_data(1);
  40. set_user_frags(killer, get_user_frags(killer) + 1);
  41.  
  42. return PLUGIN_CONTINUE;
  43.  
  44. }

Teszteltem Ibi de nem működött rendesen, így viszont már igen :D --->

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fun>
  4.  
  5.  
  6. #define PLUGIN "New Plug-In"
  7. #define VERSION "1.0"
  8. #define AUTHOR "HunGamer"
  9.  
  10. new bool:aktiv = false;
  11.  
  12. public plugin_init()
  13. {
  14. register_plugin(PLUGIN, VERSION, AUTHOR);
  15. register_event("DeathMsg","hook_death","a");
  16. set_task(60.0, "check", 0, _, _, "b");
  17. }
  18. public check()
  19. {
  20. new hour, minute, second;
  21. time(hour, minute, second);
  22. if(20 <= hour && 23 > hour || 6 <= hour && 8 > hour)
  23. aktiv=true
  24. else
  25. aktiv=false
  26.  
  27.  
  28. return PLUGIN_HANDLED;
  29. }
  30. public hook_death()
  31. {
  32. if(!aktiv)
  33. return PLUGIN_CONTINUE;
  34.  
  35. new killer = read_data(1);
  36. set_user_frags(killer, get_user_frags(killer) + 1);
  37.  
  38. return PLUGIN_CONTINUE;
  39.  
  40. }

Szerző:  Painci [ 2013.08.12. 14:34 ]
Hozzászólás témája:  Re: Dupla frag idő közönként!

Hubabuba a tiéd lett jó, köszi, ment a gomb :)

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