Witam ,czy mógłby ktoś mi pomóc w naprawieniu tego ? aby można było rzucać się przed siebie jak w American Football ? Próbowałem to przerabiać inaczej ale w ogóle błędy wywalało

na razie stoję w tym punkcie :< Oczywiście za każdą pomoc lecą plusiki

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <cstrike>
#include <fun>
#include <csx>
#include <nvault>
#define PLUGIN "American Football Mod"
#define VERSION "5.0"
#define AUTHOR "WhooKid"
new MaxPlayers, Football
new dive[33]
new fm_allowdive,
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_cvar("fm_version", VERSION, FCVAR_SERVER|FCVAR_UNLOGGED);
fm_allowdive = register_cvar("fm_allowdive", "1", FCVAR_SERVER|FCVAR_UNLOGGED);
register_clcmd("lastinv", "act_dive", _, "<Initiate a Dive>");
MaxPlayers = get_maxplayers(), model_names[9] = "Terrorists", model_names[20] = "Counter-Terrorists";
}
// resets teams for a new down
public act_reset()
{
new id, user_team
for (id = 1; id <= MaxPlayers; id++)
if (is_user_alive(id))
{
// clear dive
if (dive[id])
dive_reset(id + 62954);
}
}
public fw_start(const id, const uc_handle)
{
if (dive[id])
{
if (!(buttons & IN_DUCK))
set_pev(id, pev_view_ofs, Float:{0.0, 0.0, -15.0});
if (get_user_maxspeed(id) != 1.0)
set_user_maxspeed(id, 1.0);
if (dive[id] == 2)
if (pev(id, pev_flags) & FL_ONGROUND)
dive[id] = 3;
if (dive[id] == 3)
{
static Float:velocity[3], a;
pev(id, pev_velocity, velocity);
if (velocity[0] != 0.0 || velocity[1] != 0.0 || velocity[2] > 40.0)
{
for (a = 0; a < 2; a++)
if (velocity[a] > 4.0) velocity[a] -= 4.0;
else if (velocity[a] < -4.0) velocity[a] += 4.0;
else velocity[a] = 0.0;
if (velocity[2] > 40.0)
velocity[2] = -100.0;
set_pev(id, pev_velocity, velocity);
}
}
}
return FMRES_IGNORED;
}
// sets the animation for the dive
public fw_addtofullpack(es_handle, e, id, host, flags, player)
{
if (id && player && (dive[id] || FieldGoal == id))
{
set_es(es_handle, ES_Sequence, (FieldGoal == id) ? 3 : 8);
set_es(es_handle, ES_Frame, Float:13.0);
set_es(es_handle, ES_FrameRate, Float:0.0);
return FMRES_HANDLED;
}
return FMRES_IGNORED;
}
// perform a dive
public act_dive(id)
{
if (get_pcvar_num(fm_allowdive) && !dive[id] && pev(id, pev_flags) & FL_ONGROUND && get_user_maxspeed(id) != 1.0)
{
new Float:velocity[3];
pev(id, pev_velocity, velocity);
if (velocity[0] != 0.0 || velocity[1] != 0.0)
{
dive[id] = 1;
set_user_maxspeed(id, 1.0);
velocity[2] = (task_exists(id + 905)) ? 1.42 : 1.65;
set_pev(id, pev_velocity, velocity);
emit_sound(id, CHAN_AUTO, "player/pl_fallpain1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
set_task(0.2, "dive_grndchk", id + 63954);
set_task(random_float(2.9, 3.1), "dive_reset", id + 62954);
client_cmd(id, "+duck;+jump");
}
}
return PLUGIN_HANDLED;
}
public dive_grndchk(id){
if (dive[id - 63954] == 1)
dive[id - 63954] = 2;
}
// clear the player after a dive
public dive_reset(id)
{
id -= 62954;
if (dive[id])
if (is_user_alive(id))
{
dive[id] = 0;
set_pev(id, pev_view_ofs, Float:{0.0, 0.0, 17.0});
if (pev(id, pev_solid) > 0)
set_user_maxspeed(id, get_pcvar_num(fm_maxspeed) - 25 : get_pcvar_num(fm_maxspeed)));
client_cmd(id, "-duck;-jump");
}
}
public client_connect(id)
client_cmd(id, "cl_forwardspeed 900;cl_backspeed 900;cl_sidespeed 900");
// player leaves
public client_disconnect(id)
{
if (!Football)
return;
if (dive[id])
client_cmd(id, "-duck;-jump");
}