Help with TIME.
#1

Hey guys I am making my first server its racing and totally made by me. Just using LAdmin system. I need help with setting the time. If i want i can change the time but when i exit or a new player comes in the time is changed to DAY. How can i change my time to Midnight 0:00 permanently. I only want to night time as my GM takes place at Night time. So i want a perm night time so people when login see's night only. Thanks.
Reply
#2

Anyone? BUMP (As my topic moved)
Reply
#3

If you haven't toggled the clock on, you can just SetPlayerTime(playerid,0,0); when they connect?
Reply
#4

The clock came with LAdming and its on, where can i disable it at. i cant find it out. and THanks
Reply
#5

Well. I'll explain.

This at top of your script:
Код:
SetTimer("NightWeather", 5000, true);//Repeating NightWeather evry 5 seconds
This will repeat the timer every 5 secconds.


And this somewhere in your script:
Best to put it at the bottom.:
Код:
forward NightWeather();
public NightWeather()
{
  for(new i = 0; i < MAX_PLAYERS; i++)//
  {
    SetPlayerTime(i, 0,0);//Sets all players time to 0
    SetPlayerWeather(i, 18);//Sets all players weather to 16
  }
  return 1;
}
The i here:for(new i = 0; i < MAX_PLAYERS; i++)//
Will do it for all players. Means that the i is everyone.
SetPlayerTime(i,0,0);
That means that the time will set to 0,0 (midnight) for i. (everyone)
The SetPlayerWeather is just the same. You can change this to whatever you like.
18 is the nicest night weather. It looks very cool when there are many lights on the street ^^
Reply
#6

Thank you very much mate. This is working. =)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)