Raised This Month: $32 Target: $400
 8% 

HELP ME zp 4.3 zombie class Vampire


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sacha Dz
Junior Member
Join Date: Jun 2015
Old 07-24-2015 , 14:11   HELP ME zp 4.3 zombie class Vampire
Reply With Quote #1

hello all guys ineed help here
ineed add msg hud for player when infct humans
msg you suck hp from humans
thnx for anyone try to hep me :*
PHP Code:
 #include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>

// Plugin stuff
new const PLUGIN[] = "[ZP] Zombie Class: Vampire Zombie"
new const VERSION[] = "1.0"
new const AUTHOR[] = "NiHiLaNTh"

// Zombie parametres
new const zclass_name[] = { "Vampire" // name
new const zclass_info[] = { "suck health ]" // description
new const zclass_model[] = { "Vampire" // player model
new const zclass_clawmodel[] = { "v_Vampire.mdl" // claw model
const zclass_health 1500 // health
const zclass_speed 220 // speed
const Float:zclass_gravity 0.7 // gravity
const Float:zclass_knockback 1.5 // knockback

// Class ID
new g_zclass_vampire;

// CVAR pointers
new pcv_multi;

// Zombie classes must be registered on plugin precache
public plugin_precache()
{
    
g_zclass_vampire zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback);
}

// Plugin initialization
public plugin_init()
{
    
// Register our plugin
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// Forward
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
    
// CVAR
    
pcv_multi register_cvar("zp_vampire_multi""2"// additional health multiplier
}

// Target has been injected...
public zp_user_infected_post(idinfectornemesis)
{
    
// Our zm class
    
if (zp_get_user_zombie_class(id) == g_zclass_vampire)
    {
        
client_print(idprint_chat"[ZP] Damage or infect someone to get additional health.");
        
VampireInit(id);
    }
    
    
// Vampire zombie cannot damage anyone on Single/Multi infection rounds so...
    
if (zp_get_user_zombie_class(infector) == g_zclass_vampire)
    {
        
set_pev(infectorpev_healthfloat(pev(infectorpev_health) + 500))
    }
}

// Victim took damage from entity
public fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
    
// Not alive
    
if (!is_user_alive(victim))
        return;
        
    if (!
zp_get_user_zombie(attacker) || !zp_get_user_nemesis(attacker))
        return;
    
    if (
zp_get_user_zombie_class(attacker) == g_zclass_vampire)
    {
        
// Calculate additional health
        
static ExtraHealth;
        
ExtraHealth floatround(damage get_pcvar_num(pcv_multi))
        
        
// Set new health
        
set_pev(attackerpev_healthfloat(pev(attackerpev_health) + ExtraHealth))
    }
}        

// Vampire zombie was born...
public VampireInit(id)
{
    
// Not alive
    
if (!is_user_alive(id))
        return 
PLUGIN_CONTINUE;
    
    
// Not our zombie class
    
if (zp_get_user_zombie_class(id) != g_zclass_vampire)
        return 
PLUGIN_CONTINUE;
    
    return 
PLUGIN_CONTINUE;


Last edited by Sacha Dz; 07-25-2015 at 15:04.
Sacha Dz is offline
Sacha Dz
Junior Member
Join Date: Jun 2015
Old 07-25-2015 , 15:06   Re: HELP ME zp 4.3 zombie class Vampire
Reply With Quote #2

up up
Sacha Dz is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 07-28-2015 , 13:18   Re: HELP ME zp 4.3 zombie class Vampire
Reply With Quote #3

PHP Code:
 #include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>

// Plugin stuff
new const PLUGIN[] = "[ZP] Zombie Class: Vampire Zombie"
new const VERSION[] = "1.0"
new const AUTHOR[] = "NiHiLaNTh"

// Zombie parametres
new const zclass_name[] = { "Vampire" // name
new const zclass_info[] = { "suck health ]" // description
new const zclass_model[] = { "Vampire" // player model
new const zclass_clawmodel[] = { "v_Vampire.mdl" // claw model
const zclass_health 1500 // health
const zclass_speed 220 // speed
const Float:zclass_gravity 0.7 // gravity
const Float:zclass_knockback 1.5 // knockback

// Class ID
new g_zclass_vampire;

// CVAR pointers
new pcv_multi;

// Zombie classes must be registered on plugin precache
public plugin_precache()
{
    
g_zclass_vampire zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback);
}

// Plugin initialization
public plugin_init()
{
    
// Register our plugin
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// Forward
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
    
// CVAR
    
pcv_multi register_cvar("zp_vampire_multi""2"// additional health multiplier
}

// Target has been injected...
public zp_user_infected_post(idinfectornemesis)
{
    
// Our zm class
    
if (zp_get_user_zombie_class(id) == g_zclass_vampire)
    {
        
client_print(idprint_chat"[ZP] Damage or infect someone to get additional health.");
        
VampireInit(id);
    }
    
    
// Vampire zombie cannot damage anyone on Single/Multi infection rounds so...
    
if (zp_get_user_zombie_class(infector) == g_zclass_vampire)
    {
        
set_pev(infectorpev_healthfloat(pev(infectorpev_health) + 500))
        
set_hudmessage(25500, -1.0, -1.006.03.0)
        
show_hudmessage(infector"You Suck HP From Victim")
    }
}

// Victim took damage from entity
public fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
    
// Not alive
    
if (!is_user_alive(victim))
        return;
        
    if (!
zp_get_user_zombie(attacker) || !zp_get_user_nemesis(attacker))
        return;
    
    if (
zp_get_user_zombie_class(attacker) == g_zclass_vampire)
    {
        
// Calculate additional health
        
static ExtraHealth;
        
ExtraHealth floatround(damage get_pcvar_num(pcv_multi))
        
        
// Set new health
        
set_pev(attackerpev_healthfloat(pev(attackerpev_health) + ExtraHealth))
    }
}        

// Vampire zombie was born...
public VampireInit(id)
{
    
// Not alive
    
if (!is_user_alive(id))
        return 
PLUGIN_CONTINUE;
    
    
// Not our zombie class
    
if (zp_get_user_zombie_class(id) != g_zclass_vampire)
        return 
PLUGIN_CONTINUE;
    
    return 
PLUGIN_CONTINUE;

Depresie is offline
Sacha Dz
Junior Member
Join Date: Jun 2015
Old 07-28-2015 , 18:56   Re: HELP ME zp 4.3 zombie class Vampire
Reply With Quote #4

thanx bro :*
Sacha Dz is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode