Участник
Пользователь
- Сообщения
- 1,082
- Реакции
- 58
- Помог
- 11 раз(а)
Завтра доделаю и скину
#include <amxmodx>
#include <reapi>
#include <zombieplague>
new
g_iCvar,
g_zclass_crow;
public plugin_init() {
register_plugin("[ZP] CROW ZOMBIE", "1.0", "v3x+Roadrage");
RegisterHookChain(RG_CBasePlayer_PreThink, "CBasePlayer_PreThink", 1);
load_cvar();
}
public plugin_precache()
g_zclass_crow = zp_register_zombie_class(\
"Crow Zombie", "Can Fly", "crow", "v_knife_zombie.mdl", 100, 250, 0.6, 2.0);
public CBasePlayer_PreThink(id) {
if(!is_user_alive(id) || zp_get_user_zombie(id) || zp_get_user_nemesis(id) || zp_get_user_zombie_class(id) != g_zclass_crow)
return;
new Float:fAim[3];
velocity_by_aim(id, g_iCvar, fAim);
if(get_entvar(id, var_button) == IN_JUMP) {
set_entvar(id, var_velocity, fAim);
rg_set_rendering(id, kRenderFxGlowShell, Float:{255.0, 0.0, 0.0});
}
}
public zp_user_infected_post(id, infector) {
if (zp_get_user_zombie_class(id) != g_zclass_crow || zp_get_user_nemesis(id))
return;
client_print(id, print_chat, "[ZP] You are using crow zombie hold jump to fly");
}
stock rg_set_rendering(entity, fx = kRenderFxNone, Float:fColor[], render = kRenderNormal, Float:amount = 16.0) {
set_entvar(entity, var_rendermode, render);
set_entvar(entity, var_renderfx, fx);
set_entvar(entity, var_rendercolor, fColor);
set_entvar(entity, var_renderamt, amount);
}
load_cvar() {
bind_pcvar_num(
create_cvar(
"jp_speed", "250",
.description = "Скорость передвижения",
.has_min = true, .min_val = 0.0,
.has_max = true, .max_val = 500.0
), g_iCvar
);
}
public zp_user_humanized_post(id, survivor)
rg_set_rendering(id);
stock rg_set_rendering(entity, fx = kRenderFxNone, Float:fColor[] = {255.0, 255.0, 255.0}, render = kRenderNormal, Float:amount = 16.0) {
set_entvar(entity, var_rendermode, render);
set_entvar(entity, var_renderfx, fx);
set_entvar(entity, var_rendercolor, fColor);
set_entvar(entity, var_renderamt, amount);
}