Raised This Month: $ Target: $400
 0% 

Count Down Timer


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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