Posts: 447
Threads: 105
Joined: Feb 2013
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
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
It depends if you track time server-sided or not. If you do, of course this is how you would do it.
Posts: 447
Threads: 105
Joined: Feb 2013
I m tracking , iv a script which showing the time and date, but how ?
Posts: 241
Threads: 13
Joined: Jan 2014
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.