Raised This Month: $ Target: $400
 0% 

Problem with ham take damage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
tomes11
Member
Join Date: Apr 2010
Old 02-14-2013 , 12:29   Re: Problem with ham take damage
Reply With Quote #8

with this the regeneration works perfect, but hame_take_damage stil not. and no error log :S
PHP Code:
public ham_take_damage(victiminflictorattackerFloat:damagedamagebits)
{
    if(
is_user_connected(victim) && is_user_alive(victim) && !zp_core_is_zombie(victim)) // called when a player got hit
    
{
        
remove_task(victim+TASK_REGENERATION//remove current regeneration??
        
remove_task(victim+TASK_BLOCK//remove current delay counter??
        
set_task(5.0"RemoveBlockRegen"victim+TASK_BLOCK//then activate it
    
}
}

public 
RemoveBlockRegen(id// called when counter reaches 5 sec
{
    
remove_task(id+TASK_BLOCK// just to be sure that counter removed
    
set_task(0.2"regeneration"id+TASK_REGENERATION__"b"// start the regeneration    

tomes11 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:31.


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