Raised This Month: $51 Target: $400
 12% 

[ZP] Zombie Class : Mirror Zombie [v1.8]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 12-12-2009 , 21:55   [ZP] Zombie Class : Mirror Zombie [v1.8]
Reply With Quote #1

[ZP] Zombie Class : Mirror Zombie

Description:
A zombie class that reflect damage(Only reflect to the attacker)

Include needed:
Code:
amxmodx.inc
fun.inc
zombieplague.inc
Cvars:
Code:
zp_mirror_swarm 1 - Default(1: Allow mirror on swarm | 0: Disable mirror on swarm)
zp_mirror_plague 1 - Default(1: Allow mirror on plague | 0: Disable mirror on plague)
zp_mirror_survivor 0 - Default(1: Allow mirror on survivor | 0: Disable mirror on survivor)
zp_mirror_glow_r 250 - Default(Red glow)
zp_mirror_glow_g 0 - Default(Green glow)
zp_mirror_glow_b 0 - Default(Blue glow)
Changelog:
Code:
v1.0 - Intial release.
v1.1 - Bug fix: Human doesn't die.
v1.2 - Bug fix: Check if user is not alive, not mirror zombie, is a nemesis or a survivor.
v1.3 - Bug fix: Stops reflecting damage if mode is Swarm, Plague, Survivor(Nemesis not needed).
v1.4 - Feature: Added glow so user know it's a Mirror Zombie.
v1.5 - Bug fix: Before infection, if the user is at T and another guy is CT. The CT becomes a zombie but T(transferred to CT) shoots the CT but doesn't die.
v1.6 - Feature: Sniper doesn't have effect on Mirror Zombies.
v1.6a - Little optimization.
v1.7 - Bug fix: Glow will be gone when frozen(Thanks Merc3y.)
     - Bug fix: Glow will be replaced by nemesis if user zombie class is Mirror Zombie.(Thanks meTaLiCroSS)
     - Remove survivor check(Thanks meTaLiCroSS)
     - Change to static.(Thanks Javivi)
v1.8 - Added CVars to enable/disable for swarm,plague and survivor
     - Major Bug Fix: Mirror Effect wont work(Not using static anymore)
Attached Files
File Type: sma Get Plugin or Get Source (zp_zclass_mirror.sma - 2240 views - 4.5 KB)

Last edited by Excalibur.007; 12-17-2009 at 19:53. Reason: Pictures :)
Excalibur.007 is offline
Zombiezzz
Veteran Member
Join Date: Nov 2009
Location: Nov 2009
Old 12-12-2009 , 21:59   Re: [ZP] Class : Mirror Zombie [v1.4]
Reply With Quote #2

oo ill be checking you code! nice work so far!

Edit: Very nice code! better than me! lol +K
__________________
Zombiezzz is offline
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 12-12-2009 , 22:06   Re: [ZP] Class : Mirror Zombie [v1.4]
Reply With Quote #3

Thanks
Excalibur.007 is offline
Zombiezzz
Veteran Member
Join Date: Nov 2009
Location: Nov 2009
Old 12-12-2009 , 22:07   Re: [ZP] Class : Mirror Zombie [v1.4]
Reply With Quote #4

Nice pic! i miss my zombie server
__________________
Zombiezzz is offline
PsYChOPaTiQuE
Veteran Member
Join Date: Jan 2009
Location: Paris
Old 12-13-2009 , 07:02   Re: [ZP] Class : Mirror Zombie [v1.6]
Reply With Quote #5

maybe you can put a cvar to only reflect a % of the damages?

GJ
__________________
PsYChOPaTiQuE is offline
fR4gn0tiX!
Senior Member
Join Date: Nov 2009
Location: Georgia, Tbilisi
Old 12-13-2009 , 15:13   Re: [ZP] Class : Mirror Zombie [v1.6]
Reply With Quote #6

PHP Code:
new HP get_user_health(attacker) - damage
if(HP 0)
{
    
set_user_health(attacker,(get_user_health(attacker) - damage))



PHP Code:
new HP get_user_health(attacker) - damage
if(HP 0)
{
    
set_user_health(attackerHP)

fR4gn0tiX! is offline
Send a message via Skype™ to fR4gn0tiX!
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 12-13-2009 , 20:17   Re: [ZP] Class : Mirror Zombie [v1.6]
Reply With Quote #7

Thanks fixed

Quote:
Originally Posted by PsYChOPaTiQuE View Post
maybe you can put a cvar to only reflect a % of the damages?

GJ
I'll see what I can do.

Last edited by Excalibur.007; 12-13-2009 at 20:23.
Excalibur.007 is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 12-16-2009 , 10:17   Re: [ZP] Class : Mirror Zombie [v1.6a]
Reply With Quote #8

  1. [ZP] Zombie Class: Mirror Zombie
  2. Humans do not attack this Zombie, because they know they will die instantly.
  3. Glow gets bugged when the zombie gets freezed.
  4. Quote:
    * v1.2
    * - Major bug fix: Check if user is not alive, not Mirror Zombie, is nemesis or a survivor.
    PHP Code:
        // Not infection/multi round
        
    if(zp_is_survivor_round() || zp_is_swarm_round() || zp_is_plague_round())
            return 
    PLUGIN_HANDLED 
    Haha.
  5. PHP Code:
    const zclass_health 100 
    Damn, can be killed with a misc weapon and can die instantly without reflect the damage with the attacker.
  6. PHP Code:
        if (zp_get_user_zombie_class(id) == g_zclass_mirror)
        { 
    What's going on if is a Nemesis?
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Javivi
AlliedModders Donor
Join Date: Dec 2008
Old 12-16-2009 , 11:01   Re: [ZP] Class : Mirror Zombie [v1.6a]
Reply With Quote #9

I think you can change some "new"s for "static"s.
__________________
Javivi is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 12-16-2009 , 11:04   Re: [ZP] Class : Mirror Zombie [v1.6a]
Reply With Quote #10

Quote:
Originally Posted by Javivi View Post
I think you can change some "new" variables for "statics" variables.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Reply



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 11:38.


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