Kod:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <zombieplague>
new const PLUGIN[] = "[ZP] KUS ZOMBI";
new const VERSION[] = "1.0";
new const AUTHOR[] = "SeCkIn";
new g_zclass_crow
new bool:has_jp[33];
new const CVAR_JP_SPEED[] = "jp_speed";
// Crow Zombie Atributes
new const zclass_name[] = { "Kus Zombi" } // isim
new const zclass_info[] = { "Ziplama Tusu Ile Ucar" } // aciklama
new const zclass_model[] = { "wg_karga" } // model
new const zclass_clawmodel[] = { "wg_kargael.mdl" } // zombi eli modeli
const zclass_health = 2500 // can
const zclass_speed = 240 // hiz
const Float:zclass_gravity = 0.6 // yer cekimi
const Float:zclass_knockback = 1.8 // guc
public plugin_init()
{
register_plugin(PLUGIN , VERSION , AUTHOR);
register_cvar(CVAR_JP_SPEED , "250");
}
public plugin_precache()
{
g_zclass_crow = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}
public client_PreThink(id)
{
if(!is_user_alive(id) || !zp_get_user_zombie(id)) return PLUGIN_CONTINUE
if(zp_get_user_zombie_class(id) != g_zclass_crow) return PLUGIN_CONTINUE
new Float:fAim[3] , Float:fVelocity[3];
VelocityByAim(id , get_cvar_num(CVAR_JP_SPEED) , fAim);
if(!(get_user_button(id) & IN_JUMP))
{
fVelocity[0] = fAim[0];
fVelocity[1] = fAim[1];
fVelocity[2] = fAim[2];
set_user_velocity(id , fVelocity);
fm_set_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 16);
}
return PLUGIN_CONTINUE;
}
// User Infected forward
public zp_user_infected_post(id, infector)
{
if (zp_get_user_zombie_class(id) == g_zclass_crow)
{
client_print(id,print_chat,"[ZP] Kus zombisin ziplama tusuna bas ve uc")
has_jp[id] = true
}
}
// Set entity's rendering type (from fakemeta_util)
stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16)
{
static Float:color[3]
color[0] = float(r)
color[1] = float(g)
color[2] = float(b)
set_pev(entity, pev_renderfx, fx)
set_pev(entity, pev_rendercolor, color)
set_pev(entity, pev_rendermode, render)
set_pev(entity, pev_renderamt, float(amount))
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/
Kod:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
#define PLUGIN "[ZP] Sinif : Egilince Gorunmeyen Zombi"
#define VERSION "1.0"
#define AUTHOR "crunch98"
new const zclass_name[] = "Gorunmez Zombie"
new const zclass_info[] = "CTRL Ile Gorunmez Olur"
new const zclass_model[] = "wg_gorunmez"
new const zclass_clawmodel[] = "gorunmez_el.mdl"
const zclass_health = 6500
const zclass_speed = 190
const Float:zclass_gravity = 1.0
const Float:zclass_knockback = 1.35
new const zombie_idle_sound1[] = "zombie_plague/zombie_moan.wav"
new const zombie_idle_sound2[] = "zombie_plague/zombie_breathing.wav"
new zisA, zisB
new g_zclass_ai_zombie, g_ai_zombie_invisible
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("zp_zclass_advanced_invisble_zombie",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
g_ai_zombie_invisible = register_cvar("zp_ai_zombie_invisibility", "0")
register_forward(FM_PlayerPreThink, "fm_PlayerPreThink")
}
public plugin_precache()
{
g_zclass_ai_zombie = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
zisA = engfunc(EngFunc_PrecacheSound, zombie_idle_sound1)
zisB = engfunc(EngFunc_PrecacheSound, zombie_idle_sound2)
}
public zp_user_infected_post(player, infector)
{
if (zp_get_user_zombie_class(player) == g_zclass_ai_zombie)
{
if ((pev(player, pev_flags) & FL_DUCKING))
{
set_pev(player, pev_rendermode, kRenderTransAlpha)
set_pev(player, pev_renderamt, get_pcvar_float(g_ai_zombie_invisible))
}
}
return PLUGIN_CONTINUE
}
public fm_PlayerPreThink(player)
{
if (!is_user_alive(player) || !zp_get_user_zombie(player))
return FMRES_IGNORED
if (zp_get_user_zombie_class(player) != g_zclass_ai_zombie)
return FMRES_IGNORED
if (!(pev(player, pev_flags) & FL_DUCKING))
{
set_pev(player, pev_rendermode, kRenderNormal)
set_pev(player, pev_renderamt, 255.0)
new iRandomNum = random_num(zisA, zisB)
if (iRandomNum == zisA)
{
emit_sound(player, CHAN_VOICE, zombie_idle_sound1, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
}
else if (iRandomNum == zisB)
{
emit_sound(player, CHAN_VOICE, zombie_idle_sound2, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
}
}
else
{
set_pev(player, pev_rendermode, kRenderTransAlpha)
set_pev(player, pev_renderamt, get_pcvar_float(g_ai_zombie_invisible))
}
return FMRES_IGNORED
}