hlmod.hu
https://hlmod.hu/

Frag
https://hlmod.hu/viewtopic.php?f=29&t=12897
Oldal: 1 / 1

Szerző:  Neee csámcsogj [ 2013.11.24. 20:21 ]
Hozzászólás témája:  Frag

Szép estét

Szeretnék kérni egy olyan plugint, amely este 10-től másnap délig dupla frag-et ad!
Pl, ha lelövök 1 embert (csak én sebeztem bele), akkor ne 1 frag-et kapjak, hanem 2-t.
Lehetséges ez?

Szerző:  crazy` [ 2013.11.24. 20:36 ]
Hozzászólás témája:  Re: Frag

tessék:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fun>
  4. #include <dhudmessage>
  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. set_task(60.0*30, "hirdet", 0, _, _, "b")
  18. }
  19. public check()
  20. {
  21. new hour, minute, second;
  22. time(hour, minute, second);
  23.  
  24. if(22 <= hour || hour <= 12)
  25. aktiv = true;
  26. else
  27. aktiv = false;
  28.  
  29. return PLUGIN_CONTINUE;
  30. }
  31.  
  32. public hook_death()
  33. {
  34. if(!aktiv)
  35. return PLUGIN_CONTINUE;
  36.  
  37. new killer = read_data(1);
  38. set_user_frags(killer, get_user_frags(killer) + 1);
  39.  
  40. new frags = get_user_frags(killer)
  41. new death = get_user_deaths(killer)
  42. new team = get_user_team(killer)
  43.  
  44. message_begin(MSG_ALL, get_user_msgid("ScoreInfo"), {0,0,0}, 0)
  45. write_byte(killer)
  46. write_short(frags)
  47. write_short(death)
  48. write_short(0)
  49. write_short(team)
  50. message_end()
  51.  
  52. return PLUGIN_CONTINUE;
  53. }
  54. public hirdet()
  55. {
  56. if(!aktiv)
  57. {
  58. set_dhudmessage(255, 255, 255, -1.0, 0.20, 0, 12.0)
  59. show_dhudmessage(0, "este 22 tol 12-ig Dupla Frag van !!")
  60. }
  61. return PLUGIN_CONTINUE;
  62. }

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