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

Suggestion / Subplugin Request [REQUEST] Zombie Class: Last Chance


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr. Sexy
Senior Member
Join Date: Feb 2011
Old 11-15-2011 , 10:32   [REQUEST] Zombie Class: Last Chance
Reply With Quote #1

h1 2 all again me with my new request for zombie class ok here we go.. this zombie has a passive abbility - godmode. well, when zombie goes below 500 (can be set bya cvar amount of health, to use passive abbility) his godmode activates (like madness) for example 3 seconds (this too can be set by cvar) thats all i hope u understand me
Dr. Sexy is offline
bboygrun
CHOMP
Join Date: May 2010
Location: France
Old 11-16-2011 , 13:28   Re: [REQUEST] Zombie Class: Last Chance
Reply With Quote #2

Try this :

PHP Code:
#include < amxmodx >
#include < fakemeta >
#include < hamsandwich >
#include < zombieplague >

#define VERSION        "1.0"
#define TASK_GODMODE    6654684848

new name[ ] =         "Last Chance"
new info[ ] =         "Godmode when low hp"
new model[ ] =         "zombie_source"
new clawmodel[ ] =     "v_knife_zombie.mdl"
new health =        1500
new speed =         240
new Floatgravity =     0.9
new Floatknockback =    1.0

new zmClass

new pcvarHppcvarGodModeDuration
new FloatcvarHpFloatcvarGodModeDuration
new botHam

new boolhadGodMode33 ]

public 
plugin_init( )
{
    
register_plugin"[ZP] Zombie Class: Last Chance"VERSION"Bboy Grun" 
    
    
zmClass zp_register_zombie_classnameinfomodelclawmodelhealthspeedgravityknockback 
    
    
register_event"HLTV""Event_RoundBegin""a""1=0""2=0" )
    
    
pcvarHp =            register_cvar"zp_HpLimit""500" )
    
pcvarGodModeDuration =         register_cvar"zp_GodModeDuration""500" )
    
    
RegisterHamHam_TakeDamage"player""Fw_TakeDamage")
    
RegisterHamHam_Spawn"player""Fw_Spawn")
}

public 
plugin_init_botsid )
{
    
RegisterHamFromEntityHam_TakeDamageid"Fw_TakeDamage")
    
RegisterHamFromEntityHam_Spawnid"Fw_Spawn")
}

public 
client_putinserverid )
{
    
hadGodModeid ] = false
    
    
if( !botHam && is_user_botid ) && get_cvar_num"bot_quota" ) > )
    {
        
set_task0.4"plugin_init_bots"id )
        
botHam 1
    
}
}

public 
Event_RoundBegin( )
{
    
cvarHp =             get_pcvar_floatpcvarHp )
    
cvarGodModeDuration =         get_pcvar_floatpcvarGodModeDuration )
}

public 
Fw_TakeDamagevictiminflictorattackerFloatdamagedamagebits )
{
    if( !
hadGodModevictim ] && zp_get_user_zombievictim ) && zp_get_user_zombie_classvictim ) == zmClass )
    {
        if( ( 
pevvictimpev_health ) - damage ) <= cvarHp )
        {
            
set_pevvictimpev_takedamageDAMAGE_NO )
            
set_taskcvarGodModeDuration"stopGodMode"victim TASK_GODMODE )
            
hadGodModevictim ] = true
        
}
    }
}

public 
Fw_Spawnid )
{
    if( 
is_user_aliveid ) )
    {
        if( 
zp_get_user_zombie_classid ) == zmClass )
        {
            
hadGodModeid ] = false
        
}
        else
        {
            
hadGodModeid ] = true
//            i set hadGodMode on true --> takedamage will not have to check zp_get_user_zombie & user class
        
}
    }
}

public 
zp_user_infected_postid )
{
    if( 
zp_get_user_zombie_classid ) == zmClass )
    {
        
hadGodModeid ] = false
    
}
    else
    {
        
hadGodModeid ] = true
//        i set hadGodMode on true --> takedamage will not have to check zp_get_user_zombie & user class
    
}
}

public 
stopGodModeTaskid )
{
    
set_pevTaskid TASK_GODMODEpev_takedamageDAMAGE_YES )

__________________
bboygrun is offline
Dr. Sexy
Senior Member
Join Date: Feb 2011
Old 11-16-2011 , 15:03   Re: [REQUEST] Zombie Class: Last Chance
Reply With Quote #3

ill test it soon just answer me on steam chat what i asked u
Dr. Sexy 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 02:42.


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