SA-MP Forums Archive
[FilterScript] [FS] Time System (Good for RPG Server) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] [FS] Time System (Good for RPG Server) (/showthread.php?tid=99339)



[FS] Time System (Good for RPG Server) - virspector - 27.09.2009

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




Re: [FS] Time System (Good for RPG Server) - GiP_YossI - 27.09.2009

Pictures?


Re: [FS] Time System (Good for RPG Server) - RaFsTar - 27.09.2009

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


Re: [FS] Time System (Good for RPG Server) - GiP_YossI - 27.09.2009

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


Re: [FS] Time System (Good for RPG Server) - [XST]O_x - 27.09.2009

Simple,but very nice


Re: [FS] Time System (Good for RPG Server) - DokerJr - 27.09.2009

post the pictures



Re: [FS] Time System (Good for RPG Server) - Roxan_Almighty - 27.09.2009

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


Re: [FS] Time System (Good for RPG Server) - RaFsTar - 27.09.2009

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


Re: [FS] Time System (Good for RPG Server) - virspector - 27.09.2009

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!


Re: [FS] Time System (Good for RPG Server) - coole210 - 27.09.2009

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