Guest User

Untitled

a guest
Jun 9th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5.  
  6. #define PLUGIN "HS czy nie?"
  7. #define VERSION "1.0"
  8. #define AUTHOR "Mlody"
  9.  
  10. new choice[2]
  11. new cvar, g_time, w_time, h_time
  12.  
  13.  
  14. public plugin_init() {
  15. register_plugin(PLUGIN, VERSION, AUTHOR)
  16. cvar = register_cvar("vote", "1")
  17. g_time = register_cvar("vote_time", "10")
  18. w_time = register_cvar("vote_wait", "20")
  19. h_time = register_cvar("vote_hold", "18")
  20. register_menucmd(register_menuid("menu_1"),(1<<0)|(1<<1),"licz_glosy")
  21. new Float:votetime = get_pcvar_float(g_time)
  22. set_task(votetime,"votemod")
  23.  
  24. server_cmd("amx_pausecfg pause hitbox.amxx")
  25. server_cmd("amx_hitbox abcdefg")
  26. register_clcmd("say a", "votemod")
  27.  
  28. // Add your code here...
  29. }
  30.  
  31. public votemod()
  32. {
  33. if (get_pcvar_num(cvar) == 1)
  34. {
  35. new nazwa_mapy[32];
  36. get_mapname(nazwa_mapy, 32 );
  37.  
  38. if(containi(nazwa_mapy, "aim_") !=-1)
  39. {
  40.  
  41. new hold = get_pcvar_num(h_time)
  42. show_menu(0,(1<<0)|(1<<1), "Chcesz grac tylko na headshoty?^n^n1: Tak^n2: Nie", hold, "menu_1")
  43. new Float:timer = get_pcvar_float(w_time)
  44. set_task(timer,"sprawdz_glosy")
  45. choice[0] = 0
  46. choice[1] = 0
  47. return PLUGIN_HANDLED
  48. }
  49. }
  50. return PLUGIN_CONTINUE
  51. }
  52.  
  53. public licz_glosy(id,key)
  54. {
  55. new name[32]
  56. get_user_name(id,name,31)
  57. new co[8] = "Tak"
  58. if (key == 1) co = "Nie"
  59. client_print(0,print_chat,"* %s zaglosowal na %s", name, co)
  60. ++choice[key]
  61. return PLUGIN_HANDLED
  62. }
  63.  
  64. public sprawdz_glosy(id)
  65. {
  66. if (choice[0] >= choice[1])
  67. {
  68. client_print(0,print_chat,"* Headshot only wlaczony. (Gra na heady ^"%d^") (Gra zwykla ^"%d^"). *",choice[0],choice[1])
  69. server_cmd("amx_pausecfg enable hitbox.amxx")
  70. server_cmd("amx_hitbox a")
  71. server_cmd("amx_nukem_jk")
  72. set_hudmessage(205,55,55,-1.0,-1.0,0,6.0,12.0,0.1);
  73. show_hudmessage(id, "Zaczynamy rzeznie! HS only wlaczony!")
  74. }
  75. else
  76. {
  77. client_print(0,print_chat,"* Gramy zwyczajnie!. (Gra zwykla ^"%d^") (Gra na heady ^"%d^"). *",choice[1],choice[0])
  78. server_cmd("amx_hitbox abcdefg")
  79. server_cmd("amx_nukem_jk")
  80. set_hudmessage(118,238,0,-1.0,-1.0,0,6.0,12.0,0.1);
  81. show_hudmessage(id, "Zaczynamy rzeznie! HS only wylaczony!")
  82. }
  83. return PLUGIN_CONTINUE
  84. }
Advertisement
Add Comment
Please, Sign In to add comment