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(id, print_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_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_zclass_czombie)
{
client_print(id, print_chat, "[ZP] You're using a cold zombie class! You will gain extra hp when frozen")
}
}
__________________