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

Hi how to ask if the (Hour == [4] ) for example , my idea that everyday at 5 PM or 5 AM server automaticlly show best 4 players as textdraw , i mean instead of making timers i can ask if hour == ... is that good idea and how to do it ? thanks
Reply
#2

It depends if you track time server-sided or not. If you do, of course this is how you would do it.
Reply
#3

I m tracking , iv a script which showing the time and date, but how ?
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)