Raised This Month: $ Target: $400
 0% 

zombieme.amxx


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
albjb
Junior Member
Join Date: Jul 2013
Old 07-31-2013 , 17:59   Re: zombieme.amxx
Reply With Quote #1

edit the event:
(This testing phase)
PHP Code:
public event_damage_pain(id) {//daņo recibido
    
new damage read_data(2)
    
    new 
bodypartweapon
    
new enemy get_user_attacker(idweaponbodypart)
    if ( 
zombie[id] )//si el que recibe daņo es zombie 
    
{
        
z_life[id] = floatroundfloat(get_user_health(id)) - (float(damage)) )
        
//client_print(id, print_chat, "Total del danio recibido: %f", z_life[id])
        
zombiehealth(id)
        
emit_sound(idCHAN_VOICEpain_zombie[random_num(0ZOMBIE_PAIN 1)], 1.0ATTN_NORM0PITCH_NORM)
        return
    } 
    if(
zombie[enemy] && weapon == CSW_KNIFE && is_user_alive(id))//si el que causa el daņo es zombi    && is_user_alive(id)
    
{
        new 
Xdamage floatroundfloat(get_user_health(id)) - (float(damage) + get_pcvar_float(z_damage)) )
        
//Xdamage = la vida de la victima -(el daņo echo + el daņo extra por ser zombie)
        /*
        new vida = floatround(float(get_user_health(id)))
        new danio = floatround(float(damage) + get_pcvar_float(z_damage))
        new total = vida-danio
        client_print(enemy, print_chat, "Vida Victima: %d-%d =%d", vida, danio, total )
        */
        
if(Xdamage <= 0){
            
            
//sumara las muertes, frags... al marcador
            
new frags_frags//, deaths
            //suma +1 a las bajas causadas por el asesino
            
frags get_user_frags(enemy) + 1
            set_user_frags
(enemyfrags)
            
//suma +1 a los asesinatos de la victima (el CS por default resta -1)
            
_frags get_user_frags(id) + 1
            set_user_frags
(id_frags)
            
//suma +1 a las muertes de la victima
            //NO ES NECESARIO el CS suma +1 por default
                //deaths = cs_get_user_deaths(id) + 1
                //cs_set_user_deaths(id, deaths)
                //deaths = cs_get_user_deaths(id) + 1
                //cs_set_user_deaths(id, deaths)
                
            //para poner el sprite y quien mato a quien
            
set_msg_block(get_user_msgid("DeathMsg"),BLOCK_ONCE)
            
message_begin(MSG_ALLget_user_msgid("DeathMsg"), {000}, 0)
            
write_byte(enemy)
            
write_byte(id)
            
write_byte(0)
            
write_string("knife")
            
message_end()    
                
                
            
set_user_health(id0)
        }
        else{
            
set_user_health(idXdamage)
        }
        return
    }
    
//return PLUGIN_CONTINUE


Last edited by albjb; 07-31-2013 at 17:59.
albjb 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 15:55.


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