hlmod.hu
https://hlmod.hu/

ReAPI - Bunny Hop
https://hlmod.hu/viewtopic.php?f=134&t=29297
Oldal: 1 / 1

Szerző:  theglorious [ 2018.08.15. 19:29 ]
Hozzászólás témája:  ReAPI - Bunny Hop

ReAPI - Bunny Hop
Leírás:
  • Az ismert bunny hop plugin reapi változata. Használata szokásos módon (Space nyomva tartva)
Cvar / Beállítás:
  • bh_enabled - 1 bekapcsolt bunnyhop / 0 kikapcsolt bunnyhop
Verzió:
  • v1.0
Követelmények:
  • ReApi 5.2.0.143
Kompatibilis:
  • (Re) Amx Mod X 1.8.3-dev
Készítő:
  • PurposeLess
Plugin:
  1. #include <amxmodx>
  2. #include <reapi>
  3.  
  4. new bh_enabled;
  5.  
  6. public plugin_init() {
  7.     register_plugin("BunnyHop", "1.0", "PurposeLess");
  8.  
  9.     RegisterHookChain(RG_CBasePlayer_Jump, "CBasePlayer_Jump");
  10.  
  11.     new pcvar = create_cvar("bh_enabled", "1", _, _, .has_min = true, .min_val = 0.0, .has_max = true, .max_val = 1.0);
  12.     bind_pcvar_num(pcvar, bh_enabled);
  13. }
  14.  
  15. public CBasePlayer_Jump(const id)
  16. {
  17.     if(!bh_enabled)
  18.     {
  19.         return;
  20.     }
  21.  
  22.     static flags;
  23.     flags = get_entvar(id, var_flags);
  24.  
  25.     if(flags & FL_WATERJUMP)
  26.     {
  27.         return;
  28.     }
  29.  
  30.     static waterlevel;
  31.     waterlevel = get_entvar(id, var_waterlevel);
  32.  
  33.     if(waterlevel >= 2)
  34.     {
  35.         return;
  36.     }
  37.  
  38.     if(!(flags & FL_ONGROUND))
  39.     {
  40.         return;
  41.     }
  42.  
  43.     static Float:velocity[3];
  44.     get_entvar(id, var_velocity, velocity);
  45.     velocity[2] += 250.0;
  46.     set_entvar(id, var_velocity, velocity);
  47.  
  48.     set_entvar(id, var_gaitsequence, 6);
  49.  
  50. }

Szerző:  Shadow -.- [ 2018.08.15. 20:27 ]
Hozzászólás témája:  Re: ReAPI - Bunny Hop

theglorious írta:
ReAPI - Bunny Hop
Leírás:
  • Az ismert bunny hop plugin reapi változata. Használata szokásos módon (Space nyomva tartva)
Cvar / Beállítás:
  • bh_enabled - 1 bekapcsolt bunnyhop / 0 kikapcsolt bunnyhop
Verzió:
  • v1.0
Követelmények:
  • ReApi 5.2.0.143
Kompatibilis:
  • (Re) Amx Mod X 1.8.3-dev
Készítő:
  • PurposeLess
Plugin:
  1. #include <amxmodx>
  2. #include <reapi>
  3.  
  4. new bh_enabled;
  5.  
  6. public plugin_init() {
  7.     register_plugin("BunnyHop", "1.0", "PurposeLess");
  8.  
  9.     RegisterHookChain(RG_CBasePlayer_Jump, "CBasePlayer_Jump");
  10.  
  11.     new pcvar = create_cvar("bh_enabled", "1", _, _, .has_min = true, .min_val = 0.0, .has_max = true, .max_val = 1.0);
  12.     bind_pcvar_num(pcvar, bh_enabled);
  13. }
  14.  
  15. public CBasePlayer_Jump(const id)
  16. {
  17.     if(!bh_enabled)
  18.     {
  19.         return;
  20.     }
  21.  
  22.     static flags;
  23.     flags = get_entvar(id, var_flags);
  24.  
  25.     if(flags & FL_WATERJUMP)
  26.     {
  27.         return;
  28.     }
  29.  
  30.     static waterlevel;
  31.     waterlevel = get_entvar(id, var_waterlevel);
  32.  
  33.     if(waterlevel >= 2)
  34.     {
  35.         return;
  36.     }
  37.  
  38.     if(!(flags & FL_ONGROUND))
  39.     {
  40.         return;
  41.     }
  42.  
  43.     static Float:velocity[3];
  44.     get_entvar(id, var_velocity, velocity);
  45.     velocity[2] += 250.0;
  46.     set_entvar(id, var_velocity, velocity);
  47.  
  48.     set_entvar(id, var_gaitsequence, 6);
  49.  
  50. }


Köszi! Ment a pacsi :)

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