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

Bug player death :S


  
 
 
Thread Tools Display Modes
Author Message
Swaycher
Senior Member
Join Date: Feb 2009
Location: Arg/MyHome/PawnStudio
Old 04-13-2012 , 12:24   Bug player death :S
#1

Ya hace bastante se me bugea el player death. O se me cae el servidor cuando mato al player o tambien cuando matan al player y el sv no se cae lo que pasa es que el player queda tirado en el piso con la camara de costado y en 0 de vida

PHP Code:
RegisterHam(Ham_Killed"player""fwPlayerDeath" )

new const 
numbers[][] = { "0""1""2""3""4""5""6""7""8""9""10" }
new const 
values[] = { 030601001301703004507208001000 }

public 
fwPlayerDeathvictimattackershouldgib)
{    
    if( 
victim == attacker || !is_user_connected(attacker) || !is_user_connected(victim) )
        return 
HAM_IGNORED;
    
    
Save(attacker)
    ++
g_Combo[Master][Member2][Member3]
    
    while(
PlayerXP[attacker] >= LEVELS(PlayerLevel[attacker]))
    {
        
PlayerXP[attacker] -= PlayerLevel[attacker]
        
ColorChat(attackerGREEN"%s^1 Felicitaciones, avanzaste al nivel ^4%i"sz_PrefixPlayerLevel[attacker] )
    }
    
    if( 
In_Party[attacker] )
    {
        new 
combo g_Combo[Master][Member2][Member3]
        
        
ColorChat(MasterGREEN"%s Combo Party: %s"sz_Prefixnumbers[combo])
        
ColorChat(Member2GREEN"%s Combo Party: %s"sz_Prefixnumbers[combo] )
        
ColorChat(Member3GREEN"%s Combo Party: %s"sz_Prefixnumbers[combo] )
        
set_user_xp(Party_Ids[attacker][Master], values[combo], attacker == Party_Ids[attacker][Master] ? MULTIPLICAR SUMA)
        
set_user_xp(Party_Ids[attacker][Member2], values[combo], attacker == Party_Ids[attacker][Member2] ? MULTIPLICAR SUMA)
        
        if(
Party_Ids[attacker][Member3])
        {
            
set_user_xp(Party_Ids[attacker][Member3], values[combo], attacker == Party_Ids[attacker][Member3] ? MULTIPLICAR SUMA)
        }
        if( 
combo >= 11 )
        {
            
ColorChat(Member3RED"%s Llegaron al combo maximo! (11)"sz_Prefix )
            
ColorChat(Member2RED"%s Llegaron al combo maximo! (11)"sz_Prefix )
            
ColorChat(MasterRED"%s Llegaron al combo maximo! (11)"sz_Prefix )
            return 
HAM_IGNORED;
        }
        return 
HAM_IGNORED;
    }
    else if( 
In_Party[victim] )
    {
        return 
HAM_IGNORED;
    }
    
    if( !
Carnage )
    {
        
PlayerXP[attacker] += get_pcvar_num(XP_Kill)
        
PlayerXP[attacker] += (g_happytime) ? 1
        ShowHud
(attacker)
    }
    else
    {        
        ++
g_variablecarnage[attacker]
        
        
set_hudmessage(255000.00.0716.03.05.05.0)
        
show_hudmessage(attacker"Frags Carnage %d/10"g_variablecarnage[attacker])
        
        if( (
g_variablecarnage[attacker] == 10) || (get_user_frags(attacker) == 10))
        {
            switch( 
cs_get_user_team(attacker) )
            {
                case 
CS_TEAM_CT:
                {
                    
PuntosCTattacker ]++
                    
client_print(attackerprint_chat"Ganaste 1 punto CT")
                }
                case 
CS_TEAM_T:
                {
                    
PuntosTTattacker ]++
                    
client_print(attackerprint_chat"Ganaste 1 punto TT")
                }
            }            
            
arrayset(g_variablecarnage033)
            return 
HAM_IGNORED;
        }
        
        if( (
PlayerXP[attacker] += get_pcvar_num(XP_Kill))  || (PlayerXP[attacker] += (g_happytime) ? 1))
            return 
HAM_IGNORED;
    }
    return 
HAM_IGNORED;

No entiendo por qué pasa esto, si ni siquiera uso supercede y tampoco handled :/
__________________
Quote:
Originally Posted by fearAR View Post
Claro esta que no tengo idea de como verificar los diferentes cortes de ángulo.
http://forums.alliedmods.net/showthread.php?t=196349

Last edited by Swaycher; 04-13-2012 at 12:28.
Swaycher is offline
Send a message via MSN to Swaycher Send a message via Skype™ to Swaycher
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 04-13-2012 , 16:46   Re: Bug player death :S
#2

Donde dice "return HAM_IGNORED;" cambialo por "return;".
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 04-13-2012 , 16:47   Re: Bug player death :S
#3

igual hace muchos return que cortan varias funciones xD
__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 04-13-2012 , 16:55   Re: Bug player death :S
#4

Quote:
Originally Posted by rak View Post
igual hace muchos return que cortan varias funciones xD
El problema es que retornando "HAM_IGNORED" está deteniendo la muerte del jugador.

PD: Que feo ese party:$ jajajaj
PD 2: Se, tiene unos cuantos returns al pedo.
__________________

Last edited by Neeeeeeeeeel.-; 04-13-2012 at 16:56.
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 04-13-2012 , 17:06   Re: Bug player death :S
#5

Quote:
Originally Posted by Neeeeeeeeeel.- View Post
El problema es que retornando "HAM_IGNORED" está deteniendo la muerte del jugador.

PD: Que feo ese party:$ jajajaj
PD 2: Se, tiene unos cuantos returns al pedo.
se xD.. estoy terminando uno que se pueden agregar ilimitados integrantes al party.. y eso lo limitas con un cvar

si lo hiciera en post seria mucho mejor
__________________

www.amxmodx-es.com

Steam: Luchokoldo

Last edited by rak; 04-13-2012 at 17:07.
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
Swaycher
Senior Member
Join Date: Feb 2009
Location: Arg/MyHome/PawnStudio
Old 04-13-2012 , 18:17   Re: Bug player death :S
#6

Quote:
Originally Posted by Neeeeeeeeeel.- View Post
Donde dice "return HAM_IGNORED;" cambialo por "return;".
especifica de cual ham_ignored hablas.. porque hay bastantes xDDD
__________________
Quote:
Originally Posted by fearAR View Post
Claro esta que no tengo idea de como verificar los diferentes cortes de ángulo.
http://forums.alliedmods.net/showthread.php?t=196349
Swaycher is offline
Send a message via MSN to Swaycher Send a message via Skype™ to Swaycher
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 04-13-2012 , 18:19   Re: Bug player death :S
#7

Quote:
Originally Posted by rak View Post
si lo hiciera en post seria mucho mejor
__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 04-13-2012 , 18:49   Re: Bug player death :S
#8

Quote:
Originally Posted by Swaycher View Post
especifica de cual ham_ignored hablas.. porque hay bastantes xDDD
Todos. No podes, en una misma función, retornar una parte de la función con un valor y otra sin ningún valor. Es todos con un valor o todos sin ningún valor.
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
 


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 02:33.


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