[HELP]What's Wrong?
#1

pawn Код:
#include <a_samp>
#pragma tabsize 0

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

public SetCountDownTime(hour,min,sec)
{
    printf("Time: %02d:%02d:%02d",hour,min,sec);
    update = SetTimer("UpdateTime",1000,0);
    sec --;
    if(sec == 0) {
        min --;
    }
    if(min == 0) {
        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;
}
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)