AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   [ZP] Zombie Class : Mirror Zombie [v1.8] (https://forums.alliedmods.net/showthread.php?t=111670)

Excalibur.007 12-12-2009 21:55

[ZP] Zombie Class : Mirror Zombie [v1.8]
 
1 Attachment(s)
[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)

http://i364.photobucket.com/albums/o...rrorZombie.jpg

Zombiezzz 12-12-2009 21:59

Re: [ZP] Class : Mirror Zombie [v1.4]
 
oo ill be checking you code! nice work so far!

Edit: Very nice code! better than me! lol +K

Excalibur.007 12-12-2009 22:06

Re: [ZP] Class : Mirror Zombie [v1.4]
 
Thanks :D

Zombiezzz 12-12-2009 22:07

Re: [ZP] Class : Mirror Zombie [v1.4]
 
Nice pic! i miss my zombie server :(

PsYChOPaTiQuE 12-13-2009 07:02

Re: [ZP] Class : Mirror Zombie [v1.6]
 
maybe you can put a cvar to only reflect a % of the damages?

GJ

fR4gn0tiX! 12-13-2009 15:13

Re: [ZP] Class : Mirror Zombie [v1.6]
 
PHP Code:

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


:arrow:

PHP Code:

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



Excalibur.007 12-13-2009 20:17

Re: [ZP] Class : Mirror Zombie [v1.6]
 
Thanks fixed

Quote:

Originally Posted by PsYChOPaTiQuE (Post 1015628)
maybe you can put a cvar to only reflect a % of the damages?

GJ

I'll see what I can do.

meTaLiCroSS 12-16-2009 10:17

Re: [ZP] Class : Mirror Zombie [v1.6a]
 
  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?

Javivi 12-16-2009 11:01

Re: [ZP] Class : Mirror Zombie [v1.6a]
 
I think you can change some "new"s for "static"s.

meTaLiCroSS 12-16-2009 11:04

Re: [ZP] Class : Mirror Zombie [v1.6a]
 
Quote:

Originally Posted by Javivi (Post 1018783)
I think you can change some "new" variables for "statics" variables.

:crab:


All times are GMT -4. The time now is 15:31.

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