AMX Mod (X)  [ZP] Chainsaw Zombie Class
[ZP] Chainsaw Zombie Class
   AsusRogStrix / Cheats
: [ZP] Chainsaw Zombie Class 21.02.2020. 12:55:07. #0
  • :      "AsusRogStrix"
. Chainsaw .

:
- 0.1 -

CVARS:
- 0.1 -

#############################################################
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
#include <hamsandwich>

new const zclass_name[] = { "Chainsaw Zombie" }
new const zclass_info[] = { "Chainsaw Zombie Class" }
new const zclass_model[] = { "zombie_chainsaw" }
new const zclass_clawmodel[] = { "v_chainsaw.mdl" }
const zclass_health = 1800
const zclass_speed = 190
const Float:zclass_gravity = 1.0
const Float:zclass_knockback = 1.0

new g_zclassid1

new cvar_damage;

new const chainsaw_sounds[][] =
{
"zombie_plague/chainsaw2_miss.wav",
"zombie_plague/chainsaw1_miss.wav",
"zombie_plague/chainsaw2_miss.wav",
"zombie_plague/chainsaw1_hit.wav",
"zombie_plague/chainsaw2_hit.wav",
"zombie_plague/chainsaw1_hit.wav",
"zombie_plague/chainsaw1_miss.wav",
"zombie_plague/chainsaw2_miss.wav",
"zombie_plague/chainsaw1_hit.wav"
}

new const knife_sounds[][] =
{
"weapons/knife_deploy1.wav",
"weapons/knife_hit1.wav",
"weapons/knife_hit2.wav",
"weapons/knife_hit3.wav",
"weapons/knife_hit4.wav",
"weapons/knife_hitwall1.wav",
"weapons/knife_slash1.wav",
"weapons/knife_slash2.wav",
"weapons/knife_stab.wav"
}

public plugin_init()
{
register_plugin("[ZP] Chainsaw Zombie Class", "0.1", "Artos")

register_forward(FM_EmitSound, "fw_EmitSound");

RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")

cvar_damage = register_cvar("zp_chainsaw_damage", "2.0");
}

public plugin_precache()
{
g_zclassid1 = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)

for(new i = 0; i < sizeof chainsaw_sounds; i++)
precache_sound(chainsaw_sounds[i])
}

public zp_user_infected_post(id, infector)
{
if (zp_get_user_zombie_class(id) == g_zclassid1)
client_print(id, print_chat, "[ZP] You're using a chainsaw zombie class which have %s damage multiplier!", get_pcvar_float(cvar_damage))
}

public fw_EmitSound(id, channel, const sound[])
{
if(!is_user_alive(id) || !zp_get_user_zombie(id) || zp_get_user_survivor(id))
return FMRES_IGNORED

for(new i = 0; i < sizeof chainsaw_sounds; i++)
{
if(equal(sound, knife_sounds[i]))
{
emit_sound(id, channel, chainsaw_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM)
return FMRES_SUPERCEDE
}
}

return FMRES_IGNORED
}

public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
if (zp_get_user_nemesis(attacker) || !zp_get_user_zombie(attacker))
return HAM_IGNORED;

if (get_user_weapon(attacker) != CSW_KNIFE)
return HAM_IGNORED;

if (zp_get_user_zombie_class(attacker) == g_zclassid1)
{
damage *= get_pcvar_float(cvar_damage)
SetHamParamFloat(4, damage)
}

return HAM_SUPERCEDE
}
#############################################################
https://i.imgur.com/lCR3zS4.jpg
Download:
resources.zip (2.02 MB)
Get Source(zp_chainsaw_zombie.sma - 2.9 KB)
AsusRogStrix 23.02.2020, 20:37:01 pm, 8 /
Signature from » AsusRogStrix «

  •    

  •  Counter-Strike 1.6

  •  CS Global Offensive

  •    
  • : Kingsize
    :
    Vannya
    :
    : 1
    : 0
    : 9
    : 10