Clock Synced, but need help
#1

My clock is now synced thanks to code i found on the forums. Now, the issue is, how can i detect if it's between 8:00 and 21:00 the bank is open, but if it's from any other time outside within 8:00 and 21:00 the bank is closed?


Here is my time code:

pawn Код:
SetTimer("ClockSync", 1000, 1);
pawn Код:
forward ClockSync();
public ClockSync()
{
  Second++;
  if(Second == 60)
  {
    Minute++;
    Second = 0;
  }
  if(Minute >= 24) Minute = 0;
  for(new i; i<GetMaxPlayers(); i++) SetPlayerTime(i, Minute, Second);
  new string[64];
  format(string, sizeof(string), "The time [%d] [%d]", Minute, Second);
  return 1;
}
pawn Код:
TogglePlayerClock(playerid, 1);
Reply


Messages In This Thread
Clock Synced, but need help - by MWF2 - 10.05.2010, 18:40
Re: Clock Synced, but need help - by Backwardsman97 - 10.05.2010, 22:52
Re: Clock Synced, but need help - by MWF2 - 10.05.2010, 22:58
Re: Clock Synced, but need help - by Backwardsman97 - 10.05.2010, 23:01
Re: Clock Synced, but need help - by MWF2 - 10.05.2010, 23:05
Re: Clock Synced, but need help - by Backwardsman97 - 10.05.2010, 23:05

Forum Jump:


Users browsing this thread: 1 Guest(s)