hlmod.hu
https://hlmod.hu/

ReAPI - Parachute
https://hlmod.hu/viewtopic.php?f=134&t=29758
Oldal: 1 / 1

Szerző:  theglorious [ 2019.02.08. 17:09 ]
Hozzászólás témája:  ReAPI - Parachute

ReAPI - Parachute
Leírás:
Cvar / Beállítás:
  • Nincs
Verzió:
  • v1.1
Követelmények:
  • ReGameDLL_CS
  • ReApi
Kompatibilis:
  • Amx Mod X 1.8.2
  • Amx Mod X 1.8.3-1.9.0dev
Készítő:
  • ReHLDS Team
Plugin:
  1. #include <amxmodx>
  2. #include <reapi>
  3.  
  4. public plugin_init()
  5. {
  6.     register_plugin("[ReAPI] Parachute", "1.1", "ReHLDS Team");
  7.     RegisterHookChain(RG_PM_AirMove, "PM_AirMove", false);
  8. }
  9.  
  10. public PM_AirMove(const playerIndex)
  11. {
  12.     if (!(get_entvar(playerIndex, var_button) & IN_USE)
  13.     || get_entvar(playerIndex, var_waterlevel) > 0) {
  14.         return;
  15.     }
  16.     new Float:flVelocity[3];
  17.     get_entvar(playerIndex, var_velocity, flVelocity);
  18.     if (flVelocity[2] < 0.0)
  19.     {
  20.         flVelocity[2] = (flVelocity[2] + 40.0 < -100.0) ? flVelocity[2] + 40.0 : -100.0;
  21.         set_entvar(playerIndex, var_sequence, ACT_WALK);
  22.         set_entvar(playerIndex, var_gaitsequence, ACT_IDLE);
  23.         set_pmove(pm_velocity, flVelocity);
  24.         set_movevar(mv_gravity, 80.0);
  25.     }
  26. }

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