Raised This Month: $ Target: $400
 0% 

Need help with my Zombie Class


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
echo_cs
Senior Member
Join Date: Dec 2011
Old 12-09-2011 , 13:08   Re: Need help with my Zombie Class
Reply With Quote #1

Now the plugin is ready

PHP Code:
#include <amxmodx> 
#include <fun>
#include <zombieplague>

new hpamount

new const zclass_name[] = "Cold Zombie" // name
new const zclass_info[] = "Gains hp when frozen" // description
// new const zclass_model[] = "zombie_source" is the normal model
new const zclass_model[] = "zombie_source" // model
new const zclass_clawmodel[] = "v_knife_zombie.mdl" // claw model
const zclass_health 1500 
const zclass_speed 210 
const Float:zclass_gravity 1.0 // gravity
const Float:zclass_knockback 1.0 // knockback  

public zp_user_unfrozen(id)
{
        
set_user_health(id,get_user_health(id)+get_pcvar_num(hpamount));
        
client_print(idprint_chat"[ZP] You have gained extra 400 hp!")
}

// Class IDs
new g_zclass_czombie 

// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
 
register_plugin("[ZP] Cold Zombie""1.0""Lowfyr"
 
hpamount register_cvar("zp_hpamount""400"
 
 
// Register the new class and store ID for reference
 
g_zclass_czombie zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback
}  

public 
zp_user_infected_post idinfector )
{
              if (
zp_get_user_zombie_class(id) == g_zclass_czombie)
             {
                  
client_print(idprint_chat"[ZP] You're using a cold zombie class! You will gain extra hp when frozen"
             }

__________________
Pawn (5%)

C (80%)

C++ (20%)

SQL (5%)

Last edited by echo_cs; 12-09-2011 at 13:10.
echo_cs is offline
Lowfyr
Junior Member
Join Date: Jul 2011
Old 12-09-2011 , 15:36   Re: Need help with my Zombie Class
Reply With Quote #2

@JoKeR LauGh
Thank you, it works
Lowfyr is offline
naSTR
Veteran Member
Join Date: Dec 2011
Location: Asia, Mongolia
Old 03-06-2012 , 11:25   Re: Need help with my Zombie Class
Reply With Quote #3

BIG BUG: when you use this class and change zombie class after that round you're zombie class will have cold zombie ability!
__________________
naSTR is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 03-07-2012 , 03:21   Re: Need help with my Zombie Class
Reply With Quote #4

PHP Code:
#include <amxmodx> 
#include <fun>
#include <zombieplague>

new hpamount

// Cold Zombie Attributes
new const zclass_name[] = { "Cold Zombie" // name
new const zclass_info[] = { "Gains hp when frozen" // description
new const zclass_model[] = { "zombie_human" // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" // claw model
const zclass_health 1500 // health
const zclass_speed 210 // speed
const Float:zclass_gravity 1.0 // gravity
const Float:zclass_knockback 1.0 // knockback  

new g_zclass_czombie

public plugin_init ( )
{
    
register_plugin"[ZP] Cold Zombie""1.0""Lowfyr" 
    
hpamount register_cvar"zp_hpamount""400" 
}

public 
plugin_precache( )
{
    
g_zclass_czombie zp_register_zombie_classzclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback 
}

public 
zp_user_infected_post idinfector )
{
    if ( 
zp_get_user_zombie_classid ) == g_zclass_czombie )
    {
        
client_printidprint_chat"[ZP] You're using a cold zombie class! You will gain extra hp when frozen" 
    }
}

public 
zp_user_unfrozenid )
{
    if ( 
is_user_alive id ) )
    {
        if ( 
zp_get_user_zombie_class id ) == g_zclass_czombie )
        {
            
set_user_healthid,get_user_healthid )+ get_pcvar_numhpamount ) );
            
client_printidprint_chat"[ZP] You have gained extra 400 hp!" )
        }
    }

__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
Balgaa
Senior Member
Join Date: Mar 2010
Old 03-08-2012 , 11:16   Re: Need help with my Zombie Class
Reply With Quote #5

any zp 5.0 version?
Balgaa is offline
Reply



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 12:09.


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