Raised This Month: $32 Target: $400
 8% 

[ES]Pedido: Comando y ERROR.


  
 
 
Thread Tools Display Modes
vazmar
Veteran Member
Join Date: Apr 2009
Old 01-02-2010 , 16:58   Re: [ES]Pedido: Comando y ERROR.
#31

cambia el return PLUGIN_HANDLED por HAM_IGNORED
vazmar is offline
NemeS!S
Member
Join Date: Nov 2009
Old 01-02-2010 , 17:12   Re: [ES]Pedido: Comando y ERROR.
#32

Sigue igual cambie el PLUGIN_HANDLED por HAM_IGNORED y me sigue kikeando.

PHP Code:
// Ham Take Damage Forward (inflictor = weapon)
public fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
        
// Max ammopacks    
        
if (g_ammopacks[attacker] > 100000)
          return 
HAM_IGNORED 
NemeS!S is offline
Old 01-02-2010, 17:15
-.-
This message has been deleted by -.-. Reason: tirate un pedo y se arregla
Kiske
Veteran Member
Join Date: May 2009
Old 01-02-2010 , 17:21   Re: [ES]Pedido: Comando y ERROR.
#33

Pasa todo tu TakeDamage
__________________

Kiske is offline
Send a message via Skype™ to Kiske
NemeS!S
Member
Join Date: Nov 2009
Old 01-02-2010 , 17:29   Re: [ES]Pedido: Comando y ERROR.
#34

PHP Code:
// Ham Take Damage Forward (inflictor = weapon)
public fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
        
// Max ammopacks    
        
if (g_ammopacks[attacker] > 100000)
          return 
HAM_IGNORED

    
// 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])
    {
        
// 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)
            {
                
update_ap(attacker10)
                
g_damagedealt[attacker] -= ammodamage
            
}
        }
        if (!
g_zombie[attacker])
        {
            
damage *= get_pcvar_float(cvar_zombiearmor)
            switch (
get_user_weapon(attacker))
            {
                case (
CSW_KNIFE): damage *= 3.0
                
case (CSW_MP5NAVY):
                {
                    if (
Lvl[attacker] >= 1)
                        
damage += 202
                
}
                case (
CSW_TMP):
                {
                    if (
Lvl[attacker] >= 0)
                        
damage *= 2.0
                
}
                case (
CSW_UMP45):
                {
                    if (
Lvl[attacker] >= 5)
                        
damage *= 4.5
                
}
                case (
CSW_M4A1):
                {
                    if (
Lvl[attacker] >= 15)
                        
damage *= 2.0
                
}
                case (
CSW_ELITE):
                {
                    if (
Lvl[attacker] >= 60)
                        
damage *= 10.0
                
}
                case (
CSW_AK47):
                {
                    if (
Lvl[attacker] >= 16)
                        
damage *= 2.0
                
}
                case (
CSW_DEAGLE):
                {
                    if (
Lvl[attacker] >= 9)
                        
damage *= 3.0
                
}
                case (
CSW_SCOUT):
                {
                    if (
Lvl[attacker] >= 19)
                        
damage *= 7.0
                
}
                case (
CSW_M3):
                {
                    if (
Lvl[attacker] >= 25)
                        
damage *= 2.0
                
}
                case (
CSW_P90):
                {
                    if (
Lvl[attacker] >= 34)
                        
damage *= 9.0
                
}
                case (
CSW_SG552):
                {
                    if (
Lvl[attacker] >= 46)
                        
damage *= 10.0
                
}
                case (
CSW_GALIL):
                {
                    if (
Lvl[attacker] >= 51)
                        
damage *= 11.0
                
}
                case (
CSW_XM1014):
                {
                    if (
Lvl[attacker] >= 69)
                        
damage *= 1.0
                
}
                case (
CSW_MAC10):
                {
                    if (
Lvl[attacker] >= 74)
                        
damage *= 7.0
                
}
                case (
CSW_M249):
                {
                    if (
Lvl[attacker] >= 85)
                        
damage *= 14.0
                
}
                case (
CSW_FAMAS):
                {
                    if (
Lvl[attacker] >= 111)
                        
damage *= 15.0
                
}
                case (
CSW_AWP):
                {
                    if (
Lvl[attacker] >= 125)
                        
damage *= 16.0
                
}
                case (
CSW_SG550):
                {
                    if (
Lvl[attacker] >= 125)
                        
damage *= 17.0
                
}
                case (
CSW_AUG):
                {
                    if (
Lvl[attacker] >= 130)
                        
damage *= 25.0
                
}
            }
            
g_ammopacks[attacker]++
            
SetHamParamFloat(4damage)
        }
        if (
g_survivor[attacker])
        {
            
SetHamParamFloat(4damage 2.5)
        }
        
        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
    
update_ap(attackerget_pcvar_num(cvar_ammoinfect), 0// 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;

Completito u.u
NemeS!S is offline
Kiske
Veteran Member
Join Date: May 2009
Old 01-02-2010 , 17:33   Re: [ES]Pedido: Comando y ERROR.
#35

Quote:
Originally Posted by NemeS!S View Post
PHP Code:
// Ham Take Damage Forward (inflictor = weapon)
public fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
        
// Max ammopacks    
        
if (g_ammopacks[attacker] > 100000)
          return 
HAM_IGNORED

    
// 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])
    {
        
// 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)
            {
                
update_ap(attacker10)
                
g_damagedealt[attacker] -= ammodamage
            
}
        }
        if (!
g_zombie[attacker])
        {
            
damage *= get_pcvar_float(cvar_zombiearmor)
            switch (
get_user_weapon(attacker))
            {
                case (
CSW_KNIFE): damage *= 3.0
                
case (CSW_MP5NAVY):
                {
                    if (
Lvl[attacker] >= 1)
                        
damage += 202
                
}
                case (
CSW_TMP):
                {
                    if (
Lvl[attacker] >= 0)
                        
damage *= 2.0
                
}
                case (
CSW_UMP45):
                {
                    if (
Lvl[attacker] >= 5)
                        
damage *= 4.5
                
}
                case (
CSW_M4A1):
                {
                    if (
Lvl[attacker] >= 15)
                        
damage *= 2.0
                
}
                case (
CSW_ELITE):
                {
                    if (
Lvl[attacker] >= 60)
                        
damage *= 10.0
                
}
                case (
CSW_AK47):
                {
                    if (
Lvl[attacker] >= 16)
                        
damage *= 2.0
                
}
                case (
CSW_DEAGLE):
                {
                    if (
Lvl[attacker] >= 9)
                        
damage *= 3.0
                
}
                case (
CSW_SCOUT):
                {
                    if (
Lvl[attacker] >= 19)
                        
damage *= 7.0
                
}
                case (
CSW_M3):
                {
                    if (
Lvl[attacker] >= 25)
                        
damage *= 2.0
                
}
                case (
CSW_P90):
                {
                    if (
Lvl[attacker] >= 34)
                        
damage *= 9.0
                
}
                case (
CSW_SG552):
                {
                    if (
Lvl[attacker] >= 46)
                        
damage *= 10.0
                
}
                case (
CSW_GALIL):
                {
                    if (
Lvl[attacker] >= 51)
                        
damage *= 11.0
                
}
                case (
CSW_XM1014):
                {
                    if (
Lvl[attacker] >= 69)
                        
damage *= 1.0
                
}
                case (
CSW_MAC10):
                {
                    if (
Lvl[attacker] >= 74)
                        
damage *= 7.0
                
}
                case (
CSW_M249):
                {
                    if (
Lvl[attacker] >= 85)
                        
damage *= 14.0
                
}
                case (
CSW_FAMAS):
                {
                    if (
Lvl[attacker] >= 111)
                        
damage *= 15.0
                
}
                case (
CSW_AWP):
                {
                    if (
Lvl[attacker] >= 125)
                        
damage *= 16.0
                
}
                case (
CSW_SG550):
                {
                    if (
Lvl[attacker] >= 125)
                        
damage *= 17.0
                
}
                case (
CSW_AUG):
                {
                    if (
Lvl[attacker] >= 130)
                        
damage *= 25.0
                
}
            }
            
g_ammopacks[attacker]++
            
SetHamParamFloat(4damage)
        }
        if (
g_survivor[attacker])
        {
            
SetHamParamFloat(4damage 2.5)
        }
        
        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
    
update_ap(attackerget_pcvar_num(cvar_ammoinfect), 0// 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;

Completito u.u
Estas usando el "update_ap(attacker, 1, 0)"

Anda a la Funcion:
PHP Code:
public update_ap(idamountcheck
Y ahi adentro veras algo que dice:
PHP Code:
if (g_ammopacks[id] + amount Levels[sizeof Levels 1] - 1)
        return 
PLUGIN_HANDLED

// Cambialo por:

if (g_ammopacks[id] + amount 100000)
        return 
PLUGIN_HANDLED 



Y borra eso que agregaste al TakeDamage!
__________________

Kiske is offline
Send a message via Skype™ to Kiske
NemeS!S
Member
Join Date: Nov 2009
Old 01-02-2010 , 17:35   Re: [ES]Pedido: Comando y ERROR.
#36

Ahora te digo si funciona y edito

Igual T.T

PHP Code:
public update_ap(idamountcheck)
{
    
// La utilizacion de un while nos limitaria a hacer ciertas cosas en un futuro.
    // De todas formas, un while funciona de forma igual (un jump hacia la condicion)
    
if (check) goto check2
    
if (g_ammopacks[id] + amount 100000)
            return 
PLUGIN_HANDLED  
    
    g_ammopacks
[id] += amount
    
    check2
:
    if(
amount 0)
    {
        if(
g_ammopacks[id] < Levels[Lvl[id]] )
        {
            
Lvl[id]--
            
zp_colored_print(id"^x04[ZP]^x01 Volviste al Level:^x04 %d ^x01",Lvl[id])
            
update_ap(id, -11)
        }

    }
    else
    {
        if(
g_ammopacks[id] >= Levels[Lvl[id]] )
        {
            
Lvl[id]++
            
zp_colored_print(id"^x04[ZP]^x01 Felicitaciones!!! Subiste al Level:^x04 %d ^x01",Lvl[id])
            
update_ap(id01
        }
    }
    return 
SUCCESS


Last edited by NemeS!S; 01-02-2010 at 17:41. Reason: editanding
NemeS!S is offline
Kiske
Veteran Member
Join Date: May 2009
Old 01-02-2010 , 17:48   Re: [ES]Pedido: Comando y ERROR.
#37

Ahora que me di cuenta es un asco tu TakeDamage, poones:
PHP Code:
if(!g_zombie[attacker]) 
Adentro de ese mismo IF -.-


Y encima el "g_ammopacks[attacker]++" tenes que cambiarlos a todos a:
PHP Code:
update_ap(attacker10
PD: Cambia el "return SUCCESS" por "return PLUGIN_HANDLED"
__________________

Kiske is offline
Send a message via Skype™ to Kiske
NemeS!S
Member
Join Date: Nov 2009
Old 01-02-2010 , 18:01   Re: [ES]Pedido: Comando y ERROR.
#38

Gracias kiske ahora anda de 10 +k
NemeS!S is offline
Kiske
Veteran Member
Join Date: May 2009
Old 01-02-2010 , 18:04   Re: [ES]Pedido: Comando y ERROR.
#39

Quote:
Originally Posted by NemeS!S View Post
Gracias kiske ahora anda de 10 +k
Sacaron el Karma ^^

Solamente recibo
__________________

Kiske is offline
Send a message via Skype™ to Kiske
NemeS!S
Member
Join Date: Nov 2009
Old 01-02-2010 , 18:09   Re: [ES]Pedido: Comando y ERROR.
#40

xD! bueno toma xd
NemeS!S 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 22:23.


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