/*===============================================================================
/
/
/ [ZP] Class : Ghost Zombie
/ ( Another Zombie )
/ by The_Thing
/
/
/ Description :
/
/ This is another zombie class only this zombie will be invisble like ghost.
/ Zombie can be noticed with his blue glow, of course You can change glow to lower color.
/
/
/
/ Cvars :
/
/ zp_ghost_glow "255" - This is blue color, you can set it lower.
/
/
/
/ Changelog :
/
/ 10/11/2008 - v1.0 - First test
/
/
*/
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
new g_zclass11_ghost, g_glow
new bool:g_AreGhost[33]
new const zclass11_name[] = { "Ghost Zombie" }
new const zclass11_info[] = { "HP++ Speed- Knockback+++" }
new const zclass11_model[] = { "ghost.mdl" }
new const zclass11_clawmodel[] = { "v_ghost.mdl" }
const zclass11_health = 1550
const zclass11_speed = 190
const Float:zclass11_gravity = 1.0
const Float:zclass11_knockback = 1.75
public plugin_init()
{
g_glow = register_cvar("zp_ghost_glow", "255")
}
public plugin_precache()
{
register_plugin("[ZP] Class : Ghost Zombie", "1.0", "The_Thing")
g_zclass11_ghost = zp_register_zombie_class(zclass11_name, zclass11_info, zclass11_model, zclass11_clawmodel, zclass11_health, zclass11_speed, zclass11_gravity, zclass11_knockback)
}
public client_putinserver(id)
{
g_AreGhost[id] = false
fm_set_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 255)
}
public client_disconnect(id)
{
g_AreGhost[id] = false
}
public ghost_zombie(player)
{
if (!get_pcvar_num(g_glow) || !is_user_alive(player) || !zp_get_user_zombie(player))
{
fm_set_rendering(player, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 255)
g_AreGhost[player] = false
return FMRES_IGNORED
}
if (zp_get_user_zombie_class(player) != g_zclass11_ghost)
{
g_AreGhost[player] = true
return PLUGIN_CONTINUE
}
if (get_pcvar_num(g_glow))
{
fm_set_rendering(player, kRenderFxGlowShell, 0, 0, get_pcvar_num(g_glow), kRenderTransAlpha, 5)
}
return PLUGIN_CONTINUE
}
public zp_user_infected_post(player, infector)
{
if (zp_get_user_zombie_class(player) == g_zclass11_ghost)
{
fm_set_rendering(player, kRenderFxGlowShell, 0, 0, get_pcvar_num(g_glow), kRenderTransAlpha, 5)
}
}
stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16)
{
new Float:RenderColor[3];
RenderColor[0] = float®;
RenderColor[1] = float(g);
RenderColor[2] = float(;
set_pev(entity, pev_renderfx, fx);
set_pev(entity, pev_rendercolor, RenderColor);
set_pev(entity, pev_rendermode, render);
set_pev(entity, pev_renderamt, float(amount));
return 1;
}
spróbuj tego
Użytkownik Lyons edytował ten post 10.07.2012 00:42