Скриптер
Проверенный
Пользователь
- Сообщения
- 3,593
- Реакции
- 1,576
- Помог
- 141 раз(а)
Где, лол?Создавалось куча энтити на одного игрока, вместо одной.
#include <amxmodx>
#include <reapi>
/* If you want to add parachute model, please delete // from the beginning of define. Example: #define REPARACHUTE_MODEL
And if you want to change model name, just change parachute_model constant.
Attention please! Do not change #if defined - #else - #endif commands. Yours sincerely. */
#define REPARACHUTE_MODEL
#if defined REPARACHUTE_MODEL
new const parachute_model[] = "models/csd_parasut.mdl";
#endif
new bool:sv_parachute;
new cvar_sv_parachute;
new HookChain:HC_PM;
public plugin_init() {
register_plugin("ReParachute", "1.4", "PurposeLess");
#if defined REPARACHUTE_MODEL
DisableHookChain((HC_PM = RegisterHookChain(RG_PM_Move, "@PM_Move", .post=false)));
#else
DisableHookChain((HC_PM = RegisterHookChain(RG_PM_AirMove, "@PM_AirMove", .post=false)));
#endif
cvar_sv_parachute = create_cvar("sv_parachute", "1", _, "Enable / Disable Parachute", true, 0.0, true, 1.0);
bind_pcvar_num(cvar_sv_parachute, sv_parachute);
hook_cvar_change(cvar_sv_parachute, "@sv_parachute");
}
public plugin_cfg()
{
if(sv_parachute)
{
EnableHookChain(HC_PM);
}
}
@sv_parachute(pcvar, const old_value[], const new_value[])
{
str_to_num(new_value) ? EnableHookChain(HC_PM) : DisableHookChain(HC_PM);
}
#if defined REPARACHUTE_MODEL
new para_ent[MAX_CLIENTS + 1], parachute_model_index;
public plugin_precache()
{
parachute_model_index = precache_model(parachute_model);
}
@PM_Move(const id)
{
if(get_pmove(pm_dead))
{
return HC_CONTINUE;
}
if(get_entvar(id, var_button) & IN_USE)
{
if(get_pmove(pm_waterlevel) == 0 && get_pmove(pm_onground) == -1)
{
new Float:velocity[3];
get_pmove(pm_velocity, velocity);
if(velocity[2] < 0.0)
{
if(!para_ent[id])
{
//log_amx("Create ENT");
para_ent[id] = rg_create_entity("info_target");
if(para_ent[id] > 0)
{
set_entvar(para_ent[id], var_model, parachute_model);
set_entvar(para_ent[id], var_modelindex, parachute_model_index);
set_entvar(para_ent[id], var_movetype, MOVETYPE_FOLLOW);
set_entvar(para_ent[id], var_aiment, id);
}
}
if(para_ent[id] > 0)
{
//log_amx("Use ENT %d", para_ent[id]);
velocity[2] = (velocity[2] + 40.0 < -100.0) ? velocity[2] + 40.0 : -100.0;
set_entvar(id, var_sequence, ACT_WALK);
set_entvar(id, var_gaitsequence, ACT_IDLE);
set_pmove(pm_velocity, velocity);
set_movevar(mv_gravity, 80.0);
new Float:frame = get_entvar(para_ent[id], var_frame);
if(frame < 0.0 || frame > 254.0)
{
set_entvar(para_ent[id], var_sequence, 1);
set_entvar(para_ent[id], var_frame, 0.0);
}
else
{
set_entvar(para_ent[id], var_frame, frame + 1.0);
}
}
return HC_CONTINUE;
}
else {
if(para_ent[id] > 0)
{
set_entvar(para_ent[id], var_flags, FL_KILLME);
para_ent[id] = 0;
}
}
}
}
return HC_CONTINUE;
}
public client_disconnected(id)
{
if(para_ent[id] > 0)
{
set_entvar(para_ent[id], var_flags, FL_KILLME);
para_ent[id] = 0;
}
}
#else
@PM_AirMove(const id)
{
if(~get_entvar(id, var_button) & IN_USE || get_pmove(pm_waterlevel) > 0 || get_pmove(pm_dead))
{
return;
}
new Float:velocity[3];
get_pmove(pm_velocity, velocity);
if(velocity[2] < 0.0)
{
velocity[2] = (velocity[2] + 40.0 < -100.0) ? velocity[2] + 40.0 : -100.0;
set_entvar(id, var_sequence, ACT_WALK);
set_entvar(id, var_gaitsequence, ACT_IDLE);
set_pmove(pm_velocity, velocity);
set_movevar(mv_gravity, 80.0);
}
}
#endif
С зажатым Е и прыжками вприсяде на одном месте:
L 04/08/2020 - 13:47:55: [reparachute.amxx] Create ENT
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:55: [reparachute.amxx] Create ENT
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:55: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:56: [reparachute.amxx] Create ENT
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:57: [reparachute.amxx] Create ENT
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:57: [reparachute.amxx] Use ENT 332
L 04/08/2020 - 13:47:58: [reparachute.amxx] Create ENT
L 04/08/2020 - 13:47:58: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:58: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:58: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:58: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:58: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:58: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:58: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:47:58: [reparachute.amxx] Use ENT 328
С зажатым Е и прыжками вприсяде на одном месте:
L 04/08/2020 - 13:50:51: [reparachute.amxx] Create ENT
L 04/08/2020 - 13:50:51: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:51: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:51: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:51: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:51: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:51: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:51: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:52: [reparachute.amxx] Create ENT
L 04/08/2020 - 13:50:52: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:52: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:52: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:52: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:53: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:53: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:53: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:53: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:53: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:53: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:53: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:54: [reparachute.amxx] Create ENT
L 04/08/2020 - 13:50:54: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:54: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:54: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:54: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:55: [reparachute.amxx] Create ENT
L 04/08/2020 - 13:50:55: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:55: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:55: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:55: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:55: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:55: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:55: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:55: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:55: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:55: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:55: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:56: [reparachute.amxx] Create ENT
L 04/08/2020 - 13:50:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:56: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:57: [reparachute.amxx] Create ENT
L 04/08/2020 - 13:50:57: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:57: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:57: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:57: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:57: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:58: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:58: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:50:58: [reparachute.amxx] Create ENT
L 04/08/2020 - 13:50:58: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:58: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:58: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:59: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:59: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:59: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:59: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:59: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:59: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:50:59: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:51:00: [reparachute.amxx] Create ENT
L 04/08/2020 - 13:51:00: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:00: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:00: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:00: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:00: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:00: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:00: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:00: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:00: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:00: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:01: [reparachute.amxx] Create ENT
L 04/08/2020 - 13:51:01: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:51:01: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:51:01: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:51:01: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:51:01: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:51:01: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:51:01: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:51:01: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:51:01: [reparachute.amxx] Use ENT 328
L 04/08/2020 - 13:51:02: [reparachute.amxx] Create ENT
L 04/08/2020 - 13:51:02: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:02: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:02: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:02: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:02: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:02: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:02: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:02: [reparachute.amxx] Use ENT 340
L 04/08/2020 - 13:51:02: [reparachute.amxx] Use ENT 340