Raised This Month: $45 Target: $400
 11% 

[HELP]About last human


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
doroemon
Senior Member
Join Date: Dec 2009
Location: TF2 AFK Server
Old 12-29-2009 , 07:20   [HELP]About last human
Reply With Quote #1

Anti-Infection Armor is not work for last human,
how can I make Anti-Infection Armor is work for last human???
Thanks a lot

PS:Sorry,my engilsh is very bad
doroemon is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 12-29-2009 , 07:54   Re: [HELP]About last human
Reply With Quote #2

lol? Did you forget that last human is always killed not infected this is not a cs:source.
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
doroemon
Senior Member
Join Date: Dec 2009
Location: TF2 AFK Server
Old 12-29-2009 , 09:58   Re: [HELP]About last human
Reply With Quote #3

I know,but I want last human can Decrease Armor after Decrease HP...
doroemon is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 12-29-2009 , 10:42   Re: [HELP]About last human
Reply With Quote #4

Quote:
Originally Posted by Fry! View Post
lol? Did you forget that last human is always killed not infected this is not a cs:source.
Quote:
Originally Posted by doroemon View Post
I know,but I want last human can Decrease Armor after Decrease HP...
This should work:

PHP Code:
/*================================================================================

    [ZP] Addon: Last Human Armor Re-Enabler
    Copyright (C) 2009 by meTaLiCroSS, Viņa del Mar, Chile
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    In addition, as a special exception, the author gives permission to
    link the code of this program with the Half-Life Game Engine ("HL
    Engine") and Modified Game Libraries ("MODs") developed by Valve,
    L.L.C ("Valve"). You must obey the GNU General Public License in all
    respects for all of the code used other than the HL Engine and MODs
    from Valve. If you modify this file, you may extend this exception
    to your version of the file, but you are not obligated to do so. If
    you do not wish to do so, delete this exception statement from your
    version.

=================================================================================*/

#include <amxmodx>
#include <hamsandwich>
#include <engine>
#include <zombieplague>

// Sounds
new const sound_armorhit[] = "player/bhit_helmet-1.wav"

// Cvar pointers
new cvar_lasthumanarmor

// Plug info.
#define PLUG_VERSION "0.1"
#define PLUG_AUTH "meTaLiCroSS"

/*================================================================================
 [Init and Precache]
=================================================================================*/

public plugin_init() 
{
    
// Plugin info
    
register_plugin("[ZP] Addon: Last Human Armor Re-Enabler"PLUG_VERSIONPLUG_AUTH)
    
    
// Cvars
    
cvar_lasthumanarmor register_cvar("zp_last_human_armor""1")
    
    static 
szCvar[30]
    
formatex(szCvarcharsmax(szCvar), "v%s by %s"PLUG_VERSIONPLUG_AUTH)
    
register_cvar("zp_addon_lharmor"szCvarFCVAR_SERVER|FCVAR_SPONLY
}

public 
plugin_precache()
{
    
// Hamsandwich Forwards
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
    
// Sounds
    
precache_sound(sound_armorhit)
}

public 
fw_TakeDamage(victiminflictorattackerFloat:damagedamage_bits)
{
    
// Non-player damage or self damage
    
if (victim == attacker || !is_user_connected(attacker))
        return 
HAM_IGNORED;
    
    
// Does last human armor need to be reduced before infecting?
    
if (get_pcvar_num(cvar_lasthumanarmor) && zp_get_user_last_human(victim) && !zp_get_user_zombie(victim))
    {
        
// Get victim armor
        
static Float:flArmor
        flArmor 
entity_get_float(victimEV_FL_armorvalue)
        
        
// Block the attack if he has some
        
if (flArmor 0.0)
        {
            
emit_sound(victimCHAN_BODYsound_armorhit1.0ATTN_NORM0PITCH_NORM)
            
entity_set_float(victimEV_FL_armorvaluefloatmax(0.0flArmor damage))
            return 
HAM_SUPERCEDE;
        }
    }
    
    return 
HAM_IGNORED

__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
doroemon
Senior Member
Join Date: Dec 2009
Location: TF2 AFK Server
Old 12-29-2009 , 23:51   Re: [HELP]About last human
Reply With Quote #5

Thank you very much,I will test
doroemon is offline
doroemon
Senior Member
Join Date: Dec 2009
Location: TF2 AFK Server
Old 01-01-2010 , 07:14   Re: [HELP]About last human
Reply With Quote #6

Can you help me to add a Function?
I want last human have 100Armor can Anti infected bomb,
thanks a lot ><

PS:Sorry my engilsh is very bad

Last edited by doroemon; 01-01-2010 at 08:26.
doroemon is offline
doroemon
Senior Member
Join Date: Dec 2009
Location: TF2 AFK Server
Old 01-02-2010 , 08:36   Re: [HELP]About last human
Reply With Quote #7

Please help me ><
doroemon is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 01-02-2010 , 19:28   Re: [HELP]About last human
Reply With Quote #8

Quote:
I want last human have 100Armor can Anti infected bomb,
Wtf? You are using a Translator?
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
doroemon
Senior Member
Join Date: Dec 2009
Location: TF2 AFK Server
Old 01-03-2010 , 00:42   Re: [HELP]About last human
Reply With Quote #9

Quote:
Originally Posted by meTaLiCroSS View Post
Wtf? You are using a Translator?
Yes,because my engilsh is very very bad ><.............
doroemon is offline
Reply


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 14:55.


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