HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2. #include <engine>
  3.  
  4. #define FL_WATERJUMP (1<<11)
  5. #define FL_ONGROUND (1<<9)
  6.  
  7. public plugin_init() {
  8. register_plugin("Admin Bhop", "1.0", "Nero")
  9. register_cvar("bhop_enabled", "1")
  10. register_cvar("bhop_onlyadmin", "1")
  11. register_cvar("bhop_autojump", "1")
  12. }
  13.  
  14. public client_PreThink(id) {
  15. if ((get_cvar_num("bhop_onlyadmin") == 0)||(get_user_flags(id)&ADMIN_LEVEL_B)) {
  16. if (!get_cvar_num("bhop_enabled"))
  17. return PLUGIN_CONTINUE
  18.  
  19. entity_set_float(id, EV_FL_fuser2, 0.0)
  20.  
  21. if (!get_cvar_num("bhop_autojump"))
  22. return PLUGIN_CONTINUE
  23.  
  24. if (entity_get_int(id, EV_INT_button) & 2) {
  25. new flags = entity_get_int(id, EV_INT_flags)
  26.  
  27. if (flags & FL_WATERJUMP)
  28. return PLUGIN_CONTINUE
  29. if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )
  30. return PLUGIN_CONTINUE
  31. if ( !(flags & FL_ONGROUND) )
  32. return PLUGIN_CONTINUE
  33.  
  34. new Float:velocity[3]
  35. entity_get_vector(id, EV_VEC_velocity, velocity)
  36. velocity[2] += 250.0
  37. entity_set_vector(id, EV_VEC_velocity, velocity)
  38.  
  39. entity_set_int(id, EV_INT_gaitsequence, 6)
  40. }
  41. return PLUGIN_CONTINUE
  42. }
  43. }
  44.  
  45. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  46. *{\\ rtf1\\ ansi\\ ansicpg1250\\ deff0\\ deflang1038{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
  47. */
  48.