Raised This Month: $51 Target: $400
 12% 

Countdown in menu


Post New Thread Reply   
 
Thread Tools Display Modes
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 12-25-2010 , 21:45   Re: Countdown in menu
Reply With Quote #21

PHP Code:
public TaskFunction()
{
    
g_Timer--
    
    new 
iPlayers[32], iNumid;
    
get_playersiPlayersiNum )
    
    for( new 
0iNumi++ )
    {
        
id iPlayers[i]
        
        
MenuFunction(id)
    }
    
    if( 
g_Timer <= // if for some reason it glitches and gets below zero
    
{
        
client_print0print_chat"The timer has reached 0!" )
        
g_Timer 0;
    }
    
    new 
iPlayers[MAX_PLAYERS], iNumplayer;
    
get_players(iPlayersiNum"a");
    
    for(new 
i<= iNumi++)
    {
        
player iPlayers[i];
        
        
menu_cancel(player);
    }

__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 12-25-2010 , 22:59   Re: Countdown in menu
Reply With Quote #22

Quote:
Originally Posted by shuttle_wave View Post
PHP Code:
public TaskFunction()
{
    
g_Timer--
    
    new 
iPlayers[32], iNumid;
    
get_playersiPlayersiNum )
    
    for( new 
0iNumi++ )
    {
        
id iPlayers[i]
        
        
MenuFunction(id)
    }
    
    if( 
g_Timer <= // if for some reason it glitches and gets below zero
    
{
        
client_print0print_chat"The timer has reached 0!" )
        
g_Timer 0;
    }
    
    new 
iPlayers[MAX_PLAYERS], iNumplayer;
    
get_players(iPlayersiNum"a");
    
    for(new 
i<= iNumi++)
    {
        
player iPlayers[i];
        
        
menu_cancel(player);
    }

That would cancel the menu every time TaskFunction is called.

PHP Code:
public TaskFunction() 

    
g_Timer-- 
    
    new 
iPlayers[32], iNumid
    
get_playersiPlayersiNum 
    
    for( new 
0iNumi++ ) 
    { 
        
id iPlayers[i
        
        
MenuFunction(id
    }
    
    if( 
g_Timer <= // if for some reason it glitches and gets below zero 
    

        
client_print0print_chat"The timer has reached 0!" 
        
g_Timer 0;
        
        for( new 
0iNumi++ ) 
        { 
            
id iPlayers[i
            
            
menu_cancel(id)
        }
    }

__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.

Last edited by GXLZPGX; 12-25-2010 at 23:02.
GXLZPGX is offline
Old 12-25-2010, 23:46
NzGamers
This message has been deleted by NzGamers.
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 12-26-2010 , 00:00   Re: Countdown in menu
Reply With Quote #23

Quote:
Originally Posted by GXLZPGX View Post
That would cancel the menu every time TaskFunction is called.

PHP Code:
public TaskFunction() 

    
g_Timer-- 
    
    new 
iPlayers[32], iNumid
    
get_playersiPlayersiNum 
    
    for( new 
0iNumi++ ) 
    { 
        
id iPlayers[i
        
        
MenuFunction(id
    }
    
    if( 
g_Timer <= // if for some reason it glitches and gets below zero 
    

        
client_print0print_chat"The timer has reached 0!" 
        
g_Timer 0;
        
        for( new 
0iNumi++ ) 
        { 
            
id iPlayers[i
            
            
menu_cancel(id)
        }
    }

opps silly mistake.
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
vL.
Senior Member
Join Date: Aug 2009
Location: Estonia
Old 01-02-2011 , 17:02   Re: Countdown in menu
Reply With Quote #24

Not working correctly, it keeps re-opening the menu even when timer has hit 0.
vL. is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-02-2011 , 20:10   Re: Countdown in menu
Reply With Quote #25

Quote:
Originally Posted by vL. View Post
Not working correctly, it keeps re-opening the menu even when timer has hit 0.
Then you need to stop the looping.
__________________
fysiks is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 01-03-2011 , 00:19   Re: Countdown in menu
Reply With Quote #26

Quote:
Originally Posted by vL. View Post
Not working correctly, it keeps re-opening the menu even when timer has hit 0.
Remove the task when it hits 0.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
xakintosh
I run no-steam servers!
Join Date: Feb 2010
Location: Edge of nowhere
Old 01-03-2011 , 04:40   Re: Countdown in menu
Reply With Quote #27

It is possible i have done it and it's pretty easy :]
__________________
As soon as possible.
xakintosh is offline
Send a message via Yahoo to xakintosh Send a message via Skype™ to xakintosh
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 01-03-2011 , 05:04   Re: Countdown in menu
Reply With Quote #28

Quote:
Originally Posted by xakintosh View Post
It is possible i have done it and it's pretty easy :]
Thank you for the unneeded post.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX 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 04:25.


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