PDA

View Full Version : [FilterScript] [FS] Real Time and Date


b00m
04/11/2007, 08:11 PM
Hello, this is my first filterscript. It is time and date according to computer, where just now that filterscript runs.

Here is script: http://pastebin.com/f16c1e961
Here is FilterScript: http://www.sendspace.com/file/r10wh0 (.pwn)

_________________________________________________

UPDATE

INFO: After connect you must wait ONE MINUTE. After one minute you will see real time and date..

Source: http://pastebin.ca/944188
FilterScript: http://www.sendspace.com/file/jzzs3y (.pwn)


Screen:
http://img295.imageshack.us/img295/8306/datumzi9.png

Tommy_Vercetty
04/11/2007, 08:12 PM
very useful, congrats.

X_Cutter
04/11/2007, 09:11 PM
NICEEEEEEEEEEE

[MW]JuGGz
04/11/2007, 09:28 PM
X_Cutter ]
NICEEEEEEEEEEE
Very Well-Stated.^^
i will use this in my server fersure >:D

Exuro
04/11/2007, 11:09 PM
For some reason it only says the date when i added it to my script..

rayne
04/11/2007, 11:17 PM
thank you for it this very good ;) :P

yom
04/11/2007, 11:30 PM
Just looked the source...

Just a question: do you have tested it with more than one player? You say 'put time() under OnPlayerSpawn' .. lol.

Also, why not simply SetWorldTime(hour); ? And you can do %02d instead of checking if hour < 10, same for month etc..

Last thing: what about players who aren't in the same timezone of the server location ? You should do a /gmt command or something. And what about players who may want to set it to 12h format, and month.day instead of day.month ?

Duelos SA
05/11/2007, 03:20 AM
very nice ;)

b00m
05/11/2007, 01:15 PM
Just looked the source...

Just a question: do you have tested it with more than one player? You say 'put time() under OnPlayerSpawn' .. lol.

Also, why not simply SetWorldTime(hour); ? And you can do %02d instead of checking if hour < 10, same for month etc..

Last thing: what about players who aren't in the same timezone of the server location ? You should do a /gmt command or something. And what about players who may want to set it to 12h format, and month.day instead of day.month ?


Yes, I have tested with more player than one.

This Date and Time was did for czech rp and there you must have same gmt..

Date is in this format: 15>day , 08>month and 2007>year. It's not month.day.year.

And 12h format: It can't be, because isn't place for am and pm.



For some reason it only says the date when i added it to my script..


It sometimes does and I don't know why. I was trying anything but didn't go it. It sometimes will reveal after short time and in 2.0.2 me already it shows without problem

b00m
05/11/2007, 01:19 PM
delete pls this post, bad key :x

[Cs]moe
05/11/2007, 06:12 PM
Very cool, thanks!

killer57
05/11/2007, 06:34 PM
OMG double post

rayne
05/11/2007, 11:18 PM
the clock stops after some minutes.

[FA]StUnT4LiFeZ
06/11/2007, 08:52 AM
is there anything to setup in the code? because i get a error and i dont know what to do =S like i compile but with the samp-server.exe i run it then it says it has to close problem or somtin do you wish to report this? :-[

Grove
07/11/2007, 04:46 PM
Why have you done it the Compilcated way?

if (hour == 0){SetWorldTime(0);}
if (hour == 1){SetWorldTime(1);}
if (hour == 2){SetWorldTime(2);}
if (hour == 3){SetWorldTime(3);}
if (hour == 4){SetWorldTime(4);}
if (hour == 5){SetWorldTime(5);}
if (hour == 6){SetWorldTime(6);}
if (hour == 7){SetWorldTime(7);}
if (hour == 8){SetWorldTime(8);}
if (hour == 9){SetWorldTime(9);}
if (hour == 10){SetWorldTime(10);}
if (hour == 11){SetWorldTime(11);}
if (hour == 12){SetWorldTime(12);}
if (hour == 13){SetWorldTime(13);}
if (hour == 14){SetWorldTime(14);}
if (hour == 15){SetWorldTime(15);}
if (hour == 16){SetWorldTime(16);}
if (hour == 17){SetWorldTime(17);}
if (hour == 18){SetWorldTime(18);}
if (hour == 19){SetWorldTime(19);}
if (hour == 20){SetWorldTime(20);}
if (hour == 21){SetWorldTime(21);}
if (hour == 22){SetWorldTime(22);}
if (hour == 23){SetWorldTime(23);}
if (hour == 24){SetWorldTime(24);}

And That Only checks when a Player Spawns :S

Why didnt you Just create a Timer, and Use Looping?

For Example:

public time(){
new time = gettime();
SetWorldTime(time);
}


That would have been more easier, Smaller, and more Precise...

yom
07/11/2007, 05:49 PM
You know that gettime() (without params) returns a time in seconds?

What you are saying will not work at all.

Grove
07/11/2007, 05:56 PM
Ah well, I didnt no that :| Ya learn somthing new everyday

SanchåZ
07/11/2007, 08:23 PM
very nice fs

rayne
07/11/2007, 09:46 PM
Why have you done it the Compilcated way?

if (hour == 0){SetWorldTime(0);}
if (hour == 1){SetWorldTime(1);}
if (hour == 2){SetWorldTime(2);}
if (hour == 3){SetWorldTime(3);}
if (hour == 4){SetWorldTime(4);}
if (hour == 5){SetWorldTime(5);}
if (hour == 6){SetWorldTime(6);}
if (hour == 7){SetWorldTime(7);}
if (hour == 8){SetWorldTime(8);}
if (hour == 9){SetWorldTime(9);}
if (hour == 10){SetWorldTime(10);}
if (hour == 11){SetWorldTime(11);}
if (hour == 12){SetWorldTime(12);}
if (hour == 13){SetWorldTime(13);}
if (hour == 14){SetWorldTime(14);}
if (hour == 15){SetWorldTime(15);}
if (hour == 16){SetWorldTime(16);}
if (hour == 17){SetWorldTime(17);}
if (hour == 18){SetWorldTime(18);}
if (hour == 19){SetWorldTime(19);}
if (hour == 20){SetWorldTime(20);}
if (hour == 21){SetWorldTime(21);}
if (hour == 22){SetWorldTime(22);}
if (hour == 23){SetWorldTime(23);}
if (hour == 24){SetWorldTime(24);}

And That Only checks when a Player Spawns :S

Why didnt you Just create a Timer, and Use Looping?

For Example:

public time(){
new time = gettime();
SetWorldTime(time);
}


That would have been more easier, Smaller, and more Precise...


you prepare it?
would be good really an totally good working clock and date fs! ;)

OwzAJ
08/11/2007, 11:27 AM
Works nice , Might like to Add If you are using a RP script that gives u paydays every hour , It still gives them every game hour , So people cant just keep changing there clock settings and keep getting paydays which is good.

XxXcjmyndeXxX
08/11/2007, 08:02 PM
Why is not working, i see only hours ant seconds :(

[Cs]moe
09/11/2007, 02:04 PM
For me it works for awhile then it bugs, and time doesn't go forward anymore.

Alejandro
10/11/2007, 04:45 PM
need mirror for .pwn?

juio1234
10/11/2007, 04:47 PM
nice script

medalForces
13/11/2007, 12:04 PM
nice Fs but theres 2 things worng with it

1. the Min over laps each other
2. when you go insaide a bilding it disapears and it will not come back at all
Worth looking at :D

realy good FS

TheSh@rk
13/11/2007, 02:29 PM
Nice Job ;)
15/08 - My birthdate lol

vatolocomexi
13/11/2007, 08:17 PM
Niceee :)

VanHelsing.
14/11/2007, 10:10 AM
Well it's a awesome script :lol:
But one thing, is fault..
If i look the the clock i see > 22:05 22:06 22:07 22:08 22:09 22:10
They dont make it new they just overwrite the letters but when its 22:05 you can see the 4 trough it ;o

chytrak
24/12/2007, 09:42 PM
<removed - speak English>

miokie
24/12/2007, 09:51 PM
very nice, i will defiantly use it :P

Christian R.
24/12/2007, 10:24 PM
does not work - i dont see a clock in game ?!

b00m
15/03/2008, 09:55 PM
Today I released new version of this FS. It works without problems and you must wait one minute for show the time.
It doesn't do problem like this:
If i look the the clock i see > 22:05 22:06 22:07 22:08 22:09 22:10
They dont make it new they just overwrite the letters but when its 22:05 you can see the 4 trough it

Source: http://pastebin.ca/944188
FilterScript: http://www.sendspace.com/file/jzzs3y (.pwn)

Klid
16/03/2008, 12:33 AM
Well done mate!

This looks cool.

[CRP]X_Ray

winker2k6
20/03/2008, 08:49 PM
Today I released new version of this FS. It works without problems and you must wait one minute for show the time.
It doesn't do problem like this:
If i look the the clock i see > 22:05 22:06 22:07 22:08 22:09 22:10
They dont make it new they just overwrite the letters but when its 22:05 you can see the 4 trough it

Source: http://pastebin.ca/944188
FilterScript: http://www.sendspace.com/file/jzzs3y (.pwn)


i was just wondering
does it display the time on the server hosts computer or the players computer

ReMusiCZ
07/04/2009, 10:26 AM
AMX Please! :)

androm
21/11/2010, 05:53 PM
Sorry, but

if (hour == 0){SetWorldTime(0);}
if (hour == 1){SetWorldTime(1);}
if (hour == 2){SetWorldTime(2);}
if (hour == 3){SetWorldTime(3);}
if (hour == 4){SetWorldTime(4);}
if (hour == 5){SetWorldTime(5);}
if (hour == 6){SetWorldTime(6);}
if (hour == 7){SetWorldTime(7);}
if (hour == 8){SetWorldTime(8);}
if (hour == 9){SetWorldTime(9);}
if (hour == 10){SetWorldTime(10);}
if (hour == 11){SetWorldTime(11);}
if (hour == 12){SetWorldTime(12);}
if (hour == 13){SetWorldTime(13);}
if (hour == 14){SetWorldTime(14);}
if (hour == 15){SetWorldTime(15);}
if (hour == 16){SetWorldTime(16);}
if (hour == 17){SetWorldTime(17);}
if (hour == 18){SetWorldTime(18);}
if (hour == 19){SetWorldTime(19);}
if (hour == 20){SetWorldTime(20);}
if (hour == 21){SetWorldTime(21);}
if (hour == 22){SetWorldTime(22);}
if (hour == 23){SetWorldTime(23);}
if (hour == 24){SetWorldTime(24);}

could be just:

SetWorldTime(hour);

^_^

WillyP
21/11/2010, 05:57 PM
Sorry, but

if (hour == 0){SetWorldTime(0);}
if (hour == 1){SetWorldTime(1);}
if (hour == 2){SetWorldTime(2);}
if (hour == 3){SetWorldTime(3);}
if (hour == 4){SetWorldTime(4);}
if (hour == 5){SetWorldTime(5);}
if (hour == 6){SetWorldTime(6);}
if (hour == 7){SetWorldTime(7);}
if (hour == 8){SetWorldTime(8);}
if (hour == 9){SetWorldTime(9);}
if (hour == 10){SetWorldTime(10);}
if (hour == 11){SetWorldTime(11);}
if (hour == 12){SetWorldTime(12);}
if (hour == 13){SetWorldTime(13);}
if (hour == 14){SetWorldTime(14);}
if (hour == 15){SetWorldTime(15);}
if (hour == 16){SetWorldTime(16);}
if (hour == 17){SetWorldTime(17);}
if (hour == 18){SetWorldTime(18);}
if (hour == 19){SetWorldTime(19);}
if (hour == 20){SetWorldTime(20);}
if (hour == 21){SetWorldTime(21);}
if (hour == 22){SetWorldTime(22);}
if (hour == 23){SetWorldTime(23);}
if (hour == 24){SetWorldTime(24);}

could be just:

SetWorldTime(hour);

^_^

That wouldn't be accurate.

androm
21/11/2010, 06:40 PM
Why?
It is not so long... And it must work!

Elmerz_com
21/11/2010, 06:43 PM
Nice! Good Job but! But thats not the year.

Shadow_
21/11/2010, 07:42 PM
It really makes me laugh how much you guys are like YAY EPIC CODERZ !!

You do know this is like the 5,000,000,000th To be released ? xD

also this looks like quite a bad piece of un-efficient code.

Speederx
13/01/2011, 03:27 PM
boring...

Sinner
13/01/2011, 07:12 PM
You shouldn't use string[256] if it only used like 9 cells, string[9] would do.

[M.A]Angel[M.A]
14/01/2011, 03:46 AM
nice but you use my name xD!

[DS]SplasH
18/07/2012, 02:56 PM
Wow nice job.

marsmubarak
14/07/2013, 03:30 AM
Good
Helpful For me...

__________________________________________________ ________________

NEWGEN GLADIATOR FUN PLAY!
First Fun Play Server in SA-MP History

84.200.208.104:5091