[HELP]What's Wrong?
#4

Quote:

#include <a_samp>
#pragma tabsize 0

forward public SetCountDownTime(hour,min,sec);
forward UpdateTime();
new update;
//--------------------------------------------------

public SetCountDownTime(hour,min,sec)
{
* * printf("Time: %d:%d:%d",hour,min,sec);
* * update = SetTimer("UpdateTime",1000,0);
* * sec --;
* * if(sec == 0) {
sec=60;
* * * * min --;
* * }
* * if(min == 0) {
min=60;
* * * * hour --;
* * }
* * if(hour == 0 && min == 0 && sec == 0) {
* * * * printf("Time Over");
* * * * KillTimer(update);
* * * * return 1;
* * }

* * return 1;
}


public UpdateTime()
{
* * SetTimer("SetCountDownTime",0,0);
}


public OnGameModeInit()
{
* * SetCountDownTime(2,50,50); // Time Test - 2 Hour, 50 Min, 50 Sec
* * return 1;
}

I think this is better cause now it counts down and there is no negative value anymore
Reply


Messages In This Thread
[HELP]What's Wrong? - by CJoao - 01.04.2012, 07:46
Re: [HELP]What's Wrong? - by Joshb93 - 01.04.2012, 07:51
Re: [HELP]What's Wrong? - by CJoao - 01.04.2012, 07:54
AW: [HELP]What's Wrong? - by dalkgamler - 01.04.2012, 07:57
Re: [HELP]What's Wrong? - by SpiritEvil - 01.04.2012, 08:13

Forum Jump:


Users browsing this thread: 1 Guest(s)