Raised This Month: $ Target: $400
 0% 

Count Down Timer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BigMac
Member
Join Date: Jul 2009
Old 08-26-2009 , 15:34   Count Down Timer
Reply With Quote #1

This is part of a plugin where a person has 30 seconds to choose there weapon in the beginning of the round. But I can NOT seem to get the timer to work PLEASE HELP...




PHP Code:
ShowGunsVoteMenu(id) {
    new 
menu[256];
    new 
bool:prev = (g_guns_vote_menu[id] >= 1);
    new 
bool:next = ((g_guns_vote_menu[id] * 7) < g_guns_count);
    new 
len 0;
    new 
keys 0;
    

    
len += formatex(menu[len], charsmax(menu), "\yVote for a gun \w[\r%s\w]^n^n"g_new_fileiTimer);
    for(new 
0; (7) && ((g_guns_vote_menu[id] * i) < g_guns_count); i++) {
        
len += formatex(menu[len], charsmax(menu), "\r%d. \w%s^n", (1), g_guns_names[g_guns_vote_menu[id] * i]);
        
keys |= (<< i);
    }
    
len += formatex(menu[len], charsmax(menu), "^n\r8. %sPrevious^n"prev "\w" "\d");
    
keys |= (prev B8 0);
    
len += formatex(menu[len], charsmax(menu), "\r9. %sNext^n^n"next "\w" "\d");
    
keys |= (next B9 0);
    
len += formatex(menu[len], charsmax(menu), "\r0. \wNone^n");
    
keys |= B0;
    
    
    
show_menu(idkeysmenu, -1"GunGunsVoteMenu");
}
public 
task_Timer(iTimer[])
{
    if(
iTimer[0] > || iTimer[1] > 0)
    {
        if(
iTimer[0] == 0)
        {
            
iTimer[1]--;
            
iTimer[0] = 29;
        }
        else
        {
            
iTimer[0]--;
        }
        
    }

}

iTimer()
{
    new 
iTimer[2];
    
iTimer[0] = (iTotal 30);
    
iTimer[1] = (iTotal iTimer[0]) / 30;
    
task_Timer(iTimer);

__________________
BigMac is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 08-27-2009 , 03:31   Re: Count Down Timer
Reply With Quote #2

You have function (iTimer()) and variable (iTimer[]) with the same name. Fix this.
__________________
hleV 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:03.


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