Raised This Month: $ Target: $400
 0% 

Countdown function in menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 05-24-2010 , 16:50   Re: Countdown function in menu
Reply With Quote #1

Code:
#define count 20 static item[5] for( new i = 1; i <= count; i++ ) {     num_to_str( i, item, 4 )     menu_additem( menuindex, item, item, 0 ) }
Output:
Code:
1. 1
2. 2
3. 3
4. 4
...


Code:
#define count 20 static item[5] static place[5] for( new i = count, j; i > 0; i-- ) {     num_to_str( i, item, 4 )     num_to_str( ++j, place, 4 )     menu_additem( menuindex, item, place, 0 ) }
Output:
Code:
1. 20
2. 19
3. 18
4. 17
...
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT

Last edited by wrecked_; 05-25-2010 at 15:58.
wrecked_ 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 05:19.


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