Raised This Month: $ Target: $400
 0% 

[ZP] Invisible Zombie (Help)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
zombieplague
Veteran Member
Join Date: Apr 2009
Old 04-15-2009 , 07:27   [ZP] Invisible Zombie (Help)
Reply With Quote #1

Can anyone help me with this?

Can help me add this? :

Press E to be invisible , cooldown and how long will be the cooldown. I keep trying but it fail.

Here my code:

PHP Code:
/*================================================================================
 
 -----------------------------------
 -*- [ZP] Class : Invisible Zombie -*-
 -----------------------------------
 
 ~~~~~~~~~~~~~~~
 - Description -
 ~~~~~~~~~~~~~~~
 
 Press the key [E] to be Invisible.
 
================================================================================*/
#include <zombieplague>
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "[ZP] Zombie Classes : Invisible Zombie"
#define VERSION "1.0"
#define AUTHOR "zombieplague"
new g_zclass_izombieg_invisible_amount
new const zclass_name[] = { "Invisible Zombie" }
new const 
zclass_info[] = { "Invisible" }
new const 
zclass_model[] = { "zombie_source" }
new const 
zclass_clawmodel[] = { "v_knife_zombie.mdl" }
const 
zclass_health 1500
const zclass_speed 250
const Float:zclass_gravity 1.0
const Float:zclass_knockback 1.0
public plugin_init()
{
 
register_plugin(PLUGINVERSIONAUTHOR)
        
g_invisible_amount register_cvar("zp_izombie_invisibility""100")
 
register_forward(FM_AddToFullPack,"fw_addtofullpack",1)
}
public 
plugin_precache() 
{
 
g_zclass_izombie zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)
}
public 
zp_user_infected_post(playerinfector)
{
 if (
zp_get_user_zombie_class(player) == g_zclass_izombie)
 {
  
client_print(playerprint_chat"[ZP] To be Invisible press the key [E].")       
        }
}
 
public 
fw_addtofullpack(es_handle,e,ent,host,hostflags,player,pSet)
{
 if(!
is_user_alive(ent) || !is_user_alive(host))
  return 
FMRES_IGNORED
 
 
if(zp_get_user_zombie(ent) && zp_get_user_zombie_class(ent) == g_zclass_izombie)
 {
  
set_es(es_handleES_RenderModekRenderTransAlpha)
  
set_es(es_handleES_RenderAmtget_pcvar_num(g_invisible_amount))
 }
 return 
FMRES_IGNORED
}
stock fm_set_rendering(entityfx kRenderFxNone255255255render kRenderNormalamount 255
{
 
 
set_pev(entitypev_renderfxfx)
 
set_pev(entitypev_rendercolorRenderColor)
 
set_pev(entitypev_rendermoderender)
 
set_pev(entitypev_renderamtfloat(amount))
 return 
1

Here the example :

http://www.youtube.com/watch?v=Yu3WOjpYgoM

Last edited by zombieplague; 04-15-2009 at 11:15.
zombieplague is offline
 


Thread Tools
Display Modes

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 02:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode