Raised This Month: $ Target: $400
 0% 

Countdown


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
GhostMan
Senior Member
Join Date: Jun 2012
Old 07-15-2012 , 14:41   Re: Countdown
Reply With Quote #3

No no, this part works perfectly, i'm just curious about "time" values.

I'm willing to stop the damage when one of tasks like this is active using
PHP Code:
RegisterHam(Ham_TakeDamage"player""hook_TakeDamage"
Now it looks something like that

PHP Code:
public hook_TakeDamage(victimattackeruselessFloat:damagedamagebits) {
 
    switch(
something)
    {

        case 
1:
        {
            if(
task_exists(TASK_1))
                return 
HAM_SUPERCEDE
        
}
        
        case 
2:
        {
            if(
task_exists(TASK_2))
                return 
HAM_SUPERCEDE
        
}

        case 
3:
        {
            if(
task_exists(TASK_3))
                return 
HAM_SUPERCEDE
        
}
        
    
etc...
    
    return 
HAM_IGNORED

But i thought to get a little bit more optimised i could use code like that

PHP Code:
public hook_TakeDamage(victimattackeruselessFloat:damagedamagebits) {
 
    if(
time 0) {
        return 
HAM_SUPERCEDE
    
}
    return 
HAM_IGNORED

then i would save a lot of lines

As far as you said variable TIME stops @ 0 or -1 ( not sure ) and stays with it for good.

Last edited by GhostMan; 07-15-2012 at 14:49.
GhostMan 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 15:21.


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