[FilterScript] [FS] Time System (Good for RPG Server)
#1

I was asking in Scripting Discussion about this, but before i got the right answer, i found how to make a Time System. It's really good for RPG, because they usually make somekind of "Pay Day" or "Bank Time" or something like that.

So, how it works? This Time System will change the server time every 1 minutes. And the code? It's so simple, so i don't need to upload it.

First, add this on the top:

Код:
forward worldtime();
new hour;
and then, put this into OnGameModeInit:

Код:
public OnGameModeInit()
{
SetWorldTime(6);
hour = 6;
SetTimer("worldtime",60000,true);
}
And the last, make the 'worldtime' function:

Код:
public worldtime()
{
	hour += 1;
	if(hour == 24)
	{
	  hour = 0;
	}
	SetWorldTime(hour);
}
Done! Now run your server. You'll see that your server is in the morning. Now wait, and u'll see its starting to get noon, and then turned into night, and back into morning...

Hope it's helpfull

Reply
#2

Pictures?
Reply
#3

Quote:
Originally Posted by GiP YossI
Pictures?
LOL, it's a time system, pics are useless.
Reply
#4

oh i didn't read the theared,i thought it's a Taxt draw or something..
umm ok
thanks anyway
Reply
#5

Simple,but very nice
Reply
#6

post the pictures
Reply
#7

Quote:
Originally Posted by ► DokerJr ◄
post the pictures
you only need pic's for maps...
Reply
#8

Quote:
Originally Posted by ► DokerJr ◄
post the pictures
Or you don't understand pawn or you can't understand that's useless post pics of this.

Maybe both
Reply
#9

Quote:
Originally Posted by RaFsTar
Quote:
Originally Posted by ► DokerJr ◄
post the pictures
Or you don't understand pawn or you can't understand that's useless post pics of this.

Maybe both
LOL! ROFLMAO!

(PS: Hey RaF, i think u r inspired from WS to create a fuel system. Cuz it's 95% the same!
Reply
#10

60000 = 1 minute, not 1 hour. Good job anyways.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)