SetTimer assistance
#1

Recently I have decided to practise scripting and so far it's going quite well, however, I am stuck on something that I would really like to add to my practise script, it's basically the use of the date and time along with the SetTimer to create an information message that allows people to know exactly what time the server would restart, for example:

" a server restart has been issued, it will restart at 12:05, please leave the server so your stats wont be lost or damaged in any way"
Reply
#2

Why dont you rather say the server is restarting in x amounts of minutes?
Reply
#3

well, that's what I currently have, but I wanted it as a generalized time instead
Reply
#4

Uhmm... You said what you need to be done, generally... We really need the details to be able to help you.
Reply
#5

Isn't this better?

pawn Код:
public Counting()
{
     switch (Counter)
     {
          case 120:
          {
                SendClientMessage(playerid,COLOR,"2 minutes left before restart");
          }
     }
     Counter--;
     return 1;
}
Function counter should be called every second (with SetTimer), or every minute, but then 'Counter' variable means minutes, not seconds. I think it's the easiest way to do this.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)