Raised This Month: $ Target: $400
 0% 

Need help with my Zombie Class


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Lowfyr
Junior Member
Join Date: Jul 2011
Old 12-09-2011 , 06:00   Need help with my Zombie Class
Reply With Quote #1

Hello,

I created a cold zombie class and this class gets hp when he unfrozen
But there is one problem, if i choose raptor zombie and i gets frozen then there it say "[ZP] You have gained extra 400 hp!" how can i only set this for cold zombie? Thanks!

Here is my code:
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  

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"
             }


Last edited by Lowfyr; 12-09-2011 at 06:02.
Lowfyr is offline
 



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:10.


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