[FilterScript] [FS] Basic Clock (UPDATED to v1.3)
#1

Basic Clock v1.3
A simple clock for day and night cycles.
Source: Pastebin
About

Each minute is one r/l second, each hour is one r/l minute.
Day and night cycle comes with each hour, so it looks like 9 o'clock at night if it is 9 o'clock in game.

Fixed
Clock went to 25 hours, not 24 hours (v1.1)
Programming style default string naming (string) conflicted with other strings (v1.3)

Added
/time [hour] changes the hour to [hour], changes the ToD also. (v1.1)
Smoother time changing (v1.2)

AMX:
Reply
#2

Nice release.
Reply
#3

It's ok, but you could type instead of:
pawn Code:
if(TextZBCMinutes < 10)
    {
      format(TextZBCMinutesString, sizeof(TextZBCMinutesString), "0%i", TextZBCMinutes);
    }
    if(TextZBCMinutes > 10)
    {
      format(TextZBCMinutesString, sizeof(TextZBCMinutesString), "%i", TextZBCMinutes);
    }
    if(TextZBCHours < 10)
    {
      format(TextZBCHoursString, sizeof(TextZBCHoursString), "0%i", TextZBCHours);
    }
    if(TextZBCHours > 10)
    {
      format(TextZBCHoursString, sizeof(TextZBCHoursString), "%i", TextZBCHours);
    }
Simply:
pawn Code:
format(TextZBCMinutesString, sizeof(TextZBCMinutesString), "%02d", TextZBCMinutes);
format(TextZBCHoursString, sizeof(TextZBCHoursString), "%02d", TextZBCHours);
Reply
#4

Oh ok, but what does %02d mean? (Two digits?)
Reply
#5

this script is only for 0.3a ?
Reply
#6

Quote:
Originally Posted by ■■ DokerJr ■■
this script is only for 0.3a ?
Scripted in 0.3a, haven't tried it in any version lower, but I'm sure it will work with older versions.
Reply
#7

If we change the time ingame,

So I set it to 2 AM.
Will the clock then change too ?
Reply
#8

Quote:
Originally Posted by Rickyboy30
If we change the time ingame,

So I set it to 2 AM.
Will the clock then change too ?
No, I'm working on that now

Updated, feature added in v1.1
Reply
#9

Quote:
Originally Posted by Zinglish
Quote:
Originally Posted by Rickyboy30
If we change the time ingame,

So I set it to 2 AM.
Will the clock then change too ?
No, I'm working on that now

Updated, feature added in v1.1
It's even better now, re-downloaded. Thanks again Zinglish.
Reply
#10

Updated Basic Clock to 1.2
New features:
Very smooth ToD change now

PS:
Times between 5:30 and 6:30 are beautiful...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)