HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include <engine>
  6.  
  7. #define PLUGIN "Auto Bhop menu"
  8. #define VERSION "1.0"
  9. #define AUTHOR "qKKKJ"
  10.  
  11. new g_bhop[33]
  12.  
  13. public plugin_init() {
  14. register_plugin(PLUGIN, VERSION, AUTHOR)
  15. register_clcmd("say /bhop", "ShowMenu")
  16. }
  17.  
  18. public client_connect(id)
  19. {
  20. g_bhop[id] = false
  21. }
  22. public ShowMenu(id)
  23. {
  24. new menu = menu_create("Auto bhop", "b_hand");
  25.  
  26. menu_additem(menu, "Igen", "", 0);
  27. menu_additem(menu, "Nem", "", 0);
  28.  
  29. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  30.  
  31. menu_display(id, menu, 0);
  32.  
  33. return PLUGIN_HANDLED;
  34. }
  35.  
  36. public b_hand(id, menu, item)
  37. {
  38. if(item == MENU_EXIT)
  39. {
  40. menu_cancel(id);
  41. return PLUGIN_HANDLED;
  42. }
  43.  
  44. new command[6], name[64], access, callback;
  45.  
  46. menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
  47.  
  48. switch(item)
  49. {
  50. case 0: g_bhop[id] = true
  51. case 1: g_bhop[id] = false
  52. }
  53.  
  54. menu_destroy(menu);
  55.  
  56. return PLUGIN_HANDLED;
  57. }
  58. public client_PreThink(id) {
  59. if(g_bhop[id] == true)
  60. {
  61.  
  62. entity_set_float(id, EV_FL_fuser2, 0.0)
  63. if (entity_get_int(id, EV_INT_button) & 2) {
  64. new flags = entity_get_int(id, EV_INT_flags)
  65.  
  66. if (flags & FL_WATERJUMP)
  67. return PLUGIN_CONTINUE
  68. if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
  69. return PLUGIN_CONTINUE
  70. if ( !(flags & FL_ONGROUND) )
  71. return PLUGIN_CONTINUE
  72.  
  73. new Float:velocity[3]
  74. entity_get_vector(id, EV_VEC_velocity, velocity)
  75. velocity[2] += 250.0
  76. entity_set_vector(id, EV_VEC_velocity, velocity)
  77.  
  78. entity_set_int(id, EV_INT_gaitsequence, 6)
  79. }
  80. }
  81. return PLUGIN_CONTINUE
  82. }