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:02   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" // 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""echo_cs"
 
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:09.
echo_cs 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