Hey guys,
I want your help to create Bird Zombie, I want Zombie to fly in air for a limited time like i pressed E (+use) and Zombie is flying for limited time like 10 secs but how? This is how i made it :
PHP Code:
/*================================================================================
-----------------------------------
-*- [ZP] Bird Zombie -*-
-----------------------------------
~~~~~~~~~~~~~~~
- Description -
~~~~~~~~~~~~~~~
I know this zombie class sucks and noob but this is my first zombie class.
================================================================================*/
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
// Zombie Attributes
new const zclass_name[] = "Bird Zombie"
new const zclass_info[] = "Fly :D"
new const zclass_model[] = "choose any model for it"
new const zclass_clawmodel[] = "choose any claw for it"
const zclass_health = 2000
const zclass_speed = 290
const Float:zclass_gravity = 0.4
const Float:zclass_knockback = 2.0
// Class IDs
new g_zclassid1
// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
register_plugin("[ZP] Bird Zombie", "1.0", "Jezza")
// 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)
}
// User Infected forward
public zp_user_infected_post(id, infector)
{
// Check if the infected player is using our custom zombie class
if (zp_get_user_zombie_class(id) == g_zclassid1)
{
client_print(id, print_chat, "[ZP] You are now Bird Zombie, You can go up if any one is up.")
set_pev(id, pev_health, float(pev(id, pev_health)) + 100.0)
}
}