Jump to content

Recommended Posts

Posted

This is for Zombie Plague 4.3

 

Im going to show you how to make a simple zombie class! we are going to make a Zombie Class called "Gravity Zombie" and will have low gravity.

 

First step, we need to include ZombiePlague

 

#include <amxmodx>
#include <zombieplague>  

 

2 step. is to make the Zombie Attributes

 

// Zombie Attributes
new const zclass_name[] = { "Gravity Zombie" } // name
new const zclass_info[] = { "Low grav -HP" } // description
new const zclass_model[] = { "zombie_Source" } // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // claw model
const zclass_health = 800 // health
const zclass_speed = 200 // speed
const Float:zclass_gravity = 0.4 // gravity
const Float:zclass_knockback = 0.6 // knockback  

 

3 step. make a simple "new" code for the next entry.

 

// Class IDs
new g_zclassid1  

 

4. Now register the Zombie Class so we make this.

 

// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
register_plugin("[ZP] Zombie Class: Gravity Zombie", "1.0", "Zombiezzz") 

// Register the new class and store ID for reference
g_zclassid1 = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback) 
}  

 

5. We are almsot done. Now we make a code that makes something happens when the persone chooses the class. We will use a simple Client_print which will show the player w.e u want when he choose the class.

 

public zp_user_infected_post ( id, infector )
{
              if (zp_get_user_zombie_class(id) == g_zclassid1)
             {
                  client_print(id, print_chat, "[ZP] You Have Choosen Gravity Zombie") 
             }
}  

 

you can add glow and other items in that place.

 

Now put it all together and you should have it like this ^_^

 

/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <zombieplague>
// Zombie Attributes
new const zclass_name[] = { "Gravity Zombie" } // name
new const zclass_info[] = { "Low Grav -HP" } // description
new const zclass_model[] = { "zombie_source" } // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // claw model
const zclass_health = 800 // health
const zclass_speed = 200 // speed
const Float:zclass_gravity = 0.5 // gravity
const Float:zclass_knockback = 0.6 // knockback
// Class IDs
new g_zclassid1
// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
register_plugin("[ZP] Zombie Class: Gravity Zombie", "1.0", "Zombiezzz") 

// Register the new class and store ID for reference
g_zclassid1 = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback) 
}
public zp_user_infected_post ( id, infector )
{
              if (zp_get_user_zombie_class(id) == g_zclassid1)
             {
                  client_print(id, print_chat, "[ZP] You Have Choosen Gravity Zombie") 
             }
}  

 

also if you want to add more like lets say red glow, just reamnber to #include fun or whate ever function is needed like here.

 

/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fun>
#include <zombieplague>
// Zombie Attributes
new const zclass_name[] = { "Gravity Zombie" } // name
new const zclass_info[] = { "Low Grav -HP" } // description
new const zclass_model[] = { "zombie_source" } // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // claw model
const zclass_health = 800 // health
const zclass_speed = 200 // speed
const Float:zclass_gravity = 0.5 // gravity
const Float:zclass_knockback = 0.6 // knockback
// Class IDs
new g_zclassid1
// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
register_plugin("[ZP] Zombie Class: Gravity Zombie", "1.0", "Zombiezzz") 

// Register the new class and store ID for reference
g_zclassid1 = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback) 
}
public zp_user_infected_post ( id, infector )
{
              if (zp_get_user_zombie_class(id) == g_zclassid1)
             {
                  set_user_rendering(index,kRenderFxGlowShell,255,0,0,kRenderNormal,25)
                  client_print(id, print_chat, "[ZP] You Have Choosen Gravity Zombie") 
             }
}  

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...