Raised This Month: $ Target: $400
 0% 

Problem about forward think and bug animation


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 05-10-2012 , 05:48   Re: Problem about forward think and bug animation
Reply With Quote #4

- Updated Code to first post

PHP Code:
public zombie_attack(entvictim)
{
    
play_anim(entANIM_ATTACK1.0
    
    
emit_sound(victimCHAN_BODYsound_attack[random_num(0charsmax(sound_attack))], 1.0ATTN_NORM0PITCH_NORM)
    
ExecuteHam(Ham_TakeDamagevictim0victimrandom_float(25.050.0), DMG_SLASH
    
    
remove_task(ent+TASK_ATTACK)
    
set_task(1.5"stop_attack"ent+TASK_ATTACK)
}

public 
stop_attack(ent)
{
    
ent -= TASK_ATTACK
    
    play_anim
(entANIM_IDLE1.0)
    
remove_task(ent+TASK_ATTACK)
}

public 
zombie_dead(ent)
{
    
entity_set_int(entEV_INT_solidSOLID_NOT)
    
play_anim(entANIM_DIE1.0)
    
    
emit_sound(entCHAN_BODYsound_die[random_num(0charsmax(sound_die))], 1.0ATTN_NORM0PITCH_NORM)    
    
    
    
set_task(3.0"remove_zombie"ent)
    
    
//cs_set_user_money(i, cs_get_user_money(i) + 200)
}

public 
remove_zombie(ent)
{
    if(!
pev_valid(ent))
        return
    
    
remove_entity(ent)


Last edited by dias; 05-10-2012 at 05:48.
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
 



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 00:23.


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