If(Hour == ..) [reps+]
#4

pawn Код:
new hrs, min, sec;
forward StartTime();
public StartTime()
{
     sec++;
     if(sec == 60)
     {
        min++;
        sec = 0;
     }
     if(min == 60)
     {
       hrs++;
       mins = 0;
       sec = 0;
     }
     if(hrs == 24)
     {
        hrs = 0;
        min = 0;
        sec = 0;
     }
     if(hrs == this)// your time
     {
         //your codes
     }
     return 1;
}

public OnGamemodeInit()
{
     SetTimer("StartTime", 1000, 1);
     return 1;
}
I am 40% sure that u will get some errors bcuz i haven't tested it. So if u get some errors then try to solve them. In case of failure in solving, then give me the errors.
Reply


Messages In This Thread
If(Hour == ..) [reps+] - by SPA - 23.03.2014, 23:49
Re: If(Hour == ..) [reps+] - by MP2 - 23.03.2014, 23:56
Re: If(Hour == ..) [reps+] - by SPA - 24.03.2014, 10:41
Re: If(Hour == ..) [reps+] - by Hanuman - 24.03.2014, 11:00

Forum Jump:


Users browsing this thread: 1 Guest(s)