So I got this parachute plugin wich has a model with open+close sequence but I wana paste over the H.RED plugin's the code from the below ReAPI plugin variant because it hasn't model sequence but I think is more efficient.. -- It's annoying me that part of sequence and I don't know exactly how to replace it corectly.. and that's why I need help.. Thanks!
Код:
#include <amxmodx>
#include <reapi>
public plugin_init()
{
register_plugin("[ReAPI] Parachute", "1.1", "ReHLDS Team");
RegisterHookChain(RG_PM_AirMove, "PM_AirMove", false);
}
public PM_AirMove(const playerIndex)
{
if (!(get_entvar(playerIndex, var_button) & IN_USE)
|| get_entvar(playerIndex, var_waterlevel) > 0) {
return;
}
new Float:flVelocity[3];
get_entvar(playerIndex, var_velocity, flVelocity);
if (flVelocity[2] < 0.0)
{
flVelocity[2] = (flVelocity[2] + 40.0 < -100.0) ? flVelocity[2] + 40.0 : -100.0;
set_entvar(playerIndex, var_sequence, ACT_WALK);
set_entvar(playerIndex, var_gaitsequence, ACT_IDLE);
set_pmove(pm_velocity, flVelocity);
set_movevar(mv_gravity, 80.0);
}
}