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

[HELP] I need a easy time countdown!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
4554
Senior Member
Join Date: Aug 2009
Old 08-23-2009 , 09:57   [HELP] I need a easy time countdown!
Reply With Quote #1

I need a easy countdown! Who can give me the code?
+k
4554 is offline
pirvu
Senior Member
Join Date: Apr 2009
Location: Here and There [ro]
Old 08-23-2009 , 10:13   Re: [HELP] I need a easy time countdown!
Reply With Quote #2

dunno .. maybe try something like

i=n;

set_task (1.0, "count",id);

public count(id)
{
i--;
if (i>0)
set_task(1.0,count,id);
}
__________________
Http://pirvu.mybrute.com <- Try my BRUTE! If you dare!
pirvu is offline
Send a message via Yahoo to pirvu Send a message via Skype™ to pirvu
4554
Senior Member
Join Date: Aug 2009
Old 08-23-2009 , 10:29   Re: [HELP] I need a easy time countdown!
Reply With Quote #3

can you add ?
PHP Code:
client_print(idprint_center"countdown: %s"
thanks
4554 is offline
ds811888
BANNED
Join Date: Mar 2009
Location: Hong Kong
Old 08-23-2009 , 11:52   Re: [HELP] I need a easy time countdown!
Reply With Quote #4

Try that:
PHP Code:
new g_time_countdown 
 
 set_task
(3.0"countdown")
 
g_time_countdown 3
 
public countdown()
{
 if (
g_time_countdown >= 1)
 {
  if (
g_time_countdown <= 3)
  {
   
client_print(0print_center"Invasion CountDown: %d"g_time_countdown)
  }
 
  
g_time_countdown -= 1
  set_task
(1.0"countdown")
 }

ds811888 is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 08-23-2009 , 12:05   Re: [HELP] I need a easy time countdown!
Reply With Quote #5

This is 100% done
Attached Files
File Type: sma Get Plugin or Get Source (simple_countdown.sma - 498 views - 544 Bytes)
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-23-2009 , 12:09   Re: [HELP] I need a easy time countdown!
Reply With Quote #6

You should stop coding

PHP Code:
#include <amxmodx>

new g_iCountdowng_pCountdown;

public 
plugin_init( ) {
    
register_plugin"Simple Countdown""1.5""GameFreak" );
    
    
g_pCountdown register_cvar"countdown_time""3" );
    
g_iCountdown get_pcvar_numg_pCountdown );
    
    
set_task3.0"countdown" );
}

public 
countdown( ) {
    if( 
g_iCountdown ) {
        
client_print0print_center"Invasion Countdown: %d"g_iCountdown );
        
        
g_iCountdown--;
        
        
set_task(1.0"countdown")
    }

__________________

Last edited by xPaw; 08-23-2009 at 12:11.
xPaw 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 23:25.


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