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

[ES][ZP] Me ayudan con esto? (SOLUCIONADO)


  
 
 
Thread Tools Display Modes
XCristiaNX
Veteran Member
Join Date: Dec 2009
Old 01-07-2010 , 19:05   Re: [ES][ZP] Me ayudan con esto?
#11

PHP Code:
// Ham Take Damage Forward (inflictor = weapon)
public fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
    
// Non-player damage or self damage
    
if (victim == attacker || !is_user_connected(attacker))
        return 
HAM_IGNORED;
    
    
// New round starting or round ended
    
if (g_newround || g_endround)
        return 
HAM_SUPERCEDE;
    
    
// Victim shouldn't take damage or victim is frozen
    
if (g_nodamage[victim] || g_frozen[victim])
        return 
HAM_SUPERCEDE;
    
    
// Prevent friendly fire
    
if (g_zombie[attacker] == g_zombie[victim])
        return 
HAM_SUPERCEDE;
    
    
// Attacker is human...
    
if (!g_zombie[attacker])
    {
        if (
g_survivor[attacker])
        {
            new 
plrWeapIdplrClipplrAmmo    
            plrWeapId 
get_user_weapon(attackerplrClipplrAmmo)
            static 
Float:predamage
            predamage 
damage get_pcvar_float(cvar_zombiearmor)
            static 
Float:postdamage
            
if (plrWeapId == CSW_MP5NAVY)
            
postdamage predamage 6
            SetHamParamFloat
(4postdamage)
        }
        if (
g_soldierround)
        {
            new 
plrWeapIdplrClipplrAmmo    
            plrWeapId 
get_user_weapon(attackerplrClipplrAmmo)
            static 
Float:predamage
            predamage 
damage get_pcvar_float(cvar_zombiearmor)
            static 
Float:postdamage
            
if (plrWeapId == CSW_M4A1)
            
postdamage predamage 20
            
else
            
postdamage predamage
            SetHamParamFloat
(4postdamage)
        }
        if (
g_sniperround)
        {
            new 
plrWeapIdplrClipplrAmmo    
            plrWeapId 
get_user_weapon(attackerplrClipplrAmmo)
            static 
Float:predamage
            predamage 
damage get_pcvar_float(cvar_zombiearmor)
            static 
Float:postdamage
            
if (plrWeapId == CSW_AWP)
            
postdamage predamage 20
            
else
            
postdamage predamage
            SetHamParamFloat
(4postdamage)
        }
        if(
g_lasthuman[attacker])
        {
            new 
plrWeapIdplrClipplrAmmo    
            plrWeapId 
get_user_weapon(attackerplrClipplrAmmo)
            static 
Float:predamage
            predamage 
damage get_pcvar_float(cvar_zombiearmor)
            static 
Float:postdamage
            
if (plrWeapId == CSW_M4A1 || plrWeapId == CSW_DEAGLE)
            
postdamage predamage 3
            
else
            
postdamage predamage
            SetHamParamFloat
(4postdamage)
        }
        
// Armor multiplier for the final damage on normal zombies
        
if (!g_nemesis[victim])
        {
            
damage *= get_pcvar_float(cvar_zombiearmor)
            
SetHamParamFloat(4damage)
        }
        
        
// Reward ammo packs
        
if (!g_survivor[attacker] || !get_pcvar_num(cvar_survignoreammo))
        {
            
// Store damage dealt
            
g_damagedealt[attacker] += floatround(damage)
            
            
// Get damage required to get an ammo pack
            
static ammodamage
            ammodamage 
get_pcvar_num(cvar_ammodamage)
            
            
// Reward ammo packs for every [ammo damage] dealt
            
while (g_damagedealt[attacker] >= ammodamage)
            {
                
g_ammopacks[attacker]++
                
g_damagedealt[attacker] -= ammodamage
            
}
        }
        
        return 
HAM_IGNORED;
    }
    
    
// Attacker is zombie...
    
    // Prevent infection by HE grenade (bugfix)
    
if (damage_type DMG_HEGRENADE)
        return 
HAM_SUPERCEDE;
    
    
// Nemesis?
    
if (g_nemesis[attacker])
    {
        
// Set nemesis damage
        
SetHamParamFloat(4get_pcvar_float(cvar_nemdamage))
        return 
HAM_IGNORED;
    }
    
    
// Last human or swarm round or plague round
    
if (g_swarmround || g_plagueround || fnGetHumans() == 1)
        return 
HAM_IGNORED// human is killed
    
    // Does human armor need to be reduced before infecting?
    
if (get_pcvar_num(cvar_humanarmor))
    {
        
// Get victim armor
        
static Float:armor
        pev
(victimpev_armorvaluearmor)
        
        
// Block the attack if he has some
        
if (armor 0.0)
        {
            
engfunc(EngFunc_EmitSoundvictimCHAN_BODYsound_armorhit1.0ATTN_NORM0PITCH_NORM)
            
set_pev(victimpev_armorvaluefloatmax(0.0armor damage))
            return 
HAM_SUPERCEDE;
        }
    }
    
    
// Infection allowed
    
SendDeathMsg(attackervictim// send death notice
    
FixDeadAttrib(victim// fix the "dead" attrib on scoreboard
    
UpdateFrags(attackervictimget_pcvar_num(cvar_fragsinfect), 11// add corresponding frags and deaths
    
    
zombieme(victimattacker00// turn into zombie
    
g_ammopacks[attacker] += get_pcvar_num(cvar_ammoinfect// ammo packs given to zombie for infection
    
fm_set_user_health(attackerpev(attackerpev_health)+get_pcvar_num(cvar_zombiebonushp)) // attacker gets bonus HP for the infection
    
    
return HAM_SUPERCEDE;

XCristiaNX is offline
[L]oL
Senior Member
Join Date: Dec 2009
Old 01-07-2010 , 19:09   Re: [ES][ZP] Me ayudan con esto?
#12

con los demas proba poniendo else if
__________________
AGUANTE EL METAL
[L]oL is offline
XCristiaNX
Veteran Member
Join Date: Dec 2009
Old 01-07-2010 , 19:10   Re: [ES][ZP] Me ayudan con esto?
#13

gracias por tu ayuda lol pero no creo q sea esa la solucion...ya probe todas esas cosas :S...debe ser algo en el main q no tengo idea de q puede ser :S


EDIT: SOLUCIONADO tenia

PHP Code:
        // Armor multiplier for the final damage on normal zombies
        
if (!g_nemesis[victim])
        {
            
damage *= get_pcvar_float(cvar_zombiearmor)
            
SetHamParamFloat(4damage)
        } 
al final...jeje error mio ...Gracias por su ayuda ^^

Last edited by XCristiaNX; 01-07-2010 at 20:21.
XCristiaNX is offline
 



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


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