Raised This Month: $ Target: $400
 0% 

Countdown timer..


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
[X]-RayCat
Senior Member
Join Date: Sep 2006
Old 03-08-2008 , 15:05   Countdown timer..
Reply With Quote #1

I need help with countdown timer. Here is little example:

PHP Code:
#include <amxmodx>
 
new timer 11
 
public plugin_init()
{
     
register_plugin("timer test""1.0""me");
     
register_clcmd("say /timer""cmdTimer"ADMIN_RCON"starts timer");
}
public 
cmdTimer(id)
{
     
set_task(1.0"countdown"id,_,_,"b");
}
public 
countdown(id)
{
     
timer --
     
client_print(0print_chat"Timeleft: %d"timer);
     if(
timer 1)
     {
          
remove_task(id)
          
timer 11
     
}

But i want it to show minutes and seconds:

Code:
(0:10)
(0:09)
(0:08)
   ...

Last edited by [X]-RayCat; 03-08-2008 at 15:15.
[X]-RayCat 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 23:52.


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