lights while the server time is 12.00? - 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: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: lights while the server time is 12.00? (
/showthread.php?tid=228914)
lights while the server time is 12.00? -
LZLo - 20.02.2011
How can i switch on the lights while the server time is (for example) 12.00?
Re: lights while the server time is 12.00? -
iMonk3y - 20.02.2011
DO you mean sun light or... a regular light switch?
gettime() function might help. Good luck Mr LZLo!
Re: lights while the server time is 12.00? - rjjj - 20.02.2011
I think that it will solve your problem
pawn Код:
//Put in the OnGameModeInit:
SetTimer("Timer12", 1000, true);
//Put in the end of your GameMode:
forward Timer12();
public Timer12()
{
new Hour,Minute,Second;
gettime(Hour,Minute,Second);
if(Hour == 12.00)
{
//Put here the Functions about the lights !
}
return 1;
}
I hope that i have helped